Setting up the same route for both client and server using iron-router in meteor -
i want set route post requests, server logic , client loads view for same route. so, example, route /myroute
have:
if (meteor.isclient) { router.route('/myroute'); } if (meteor.isserver) { router.route('/myroute', {where: 'server'}) .post(function() { console.log('this server side'); this.next(); }); }
however, server-side not called @ all, , template rendered no console logs on server.
how can make work?
Comments
Post a Comment