This post has been updated.
For HTTP server requests through a meteorite, you need a router. I would recommend ironRouter. There was a meteorite router, but Tom Coleman also built IronRouter.
You can use something like this:
Router.map(function () {
this.route('serverFile', {
path: '/pathonserver',
action: function () {
console.log(this.params);
this.response.writeHead(200, {'Content-Type': 'text/html'});
this.response.end('hello from server');
}
});
});
I hope this should lead to the fact that the route will work similarly to an express router.
source
share