Meteor 301 redirect nodejs

How do I redirect www.site.com to site.com with 301 in meteorjs.

I normally use express but we don't have that in meteor.

If you look in packages/accounts-oauth-helper/oauth_server.js you'll find an example of how make the server listen on HTTP:

// Listen to incoming OAuth http requests
__meteor_bootstrap__.app
  .use(connect.query())
  .use(function(req, res, next) {
    // Need to create a Fiber since we're using synchronous http
    // calls and nothing else is wrapping this in a fiber
    // automatically
    Fiber(function () {
      Accounts.oauth._middleware(req, res, next);
    }).run();
  });

Instead of spawing a Fiber and calling into the OAuth middleware logic, you can check req.url and either set HTTP headers with res.writeHead and call res.end(), or continue into the usual Meteor stack with next().