title: Authentication Using Passport.js Serving Stating Content Through Nginx
body: <p>for a project that im currently working on, i decided not to use node's http server, and for a few days i have been trying to figure out how to combine a socket.io-passport app with nginx.To my understanding im forced to use express (for session handling).Its very weird that all the examples i have found on the net, always using node's server for serving static content and noone has made an actual working example with Nginx instead.Let me describe my problem.</p>
  
  <p>Consider the following code</p>
  
  <pre><code>app.get('/home', function(reg, res){
      //check user session value, is logged in 
      if(req.user)
          res.render('dash',{
              username: req.user['member_id']//req.user array contains serializeUser data
          });
      else
          res.render('index');
  
  });
  
  app.get('/logout', function(req, res){
  
      req.logout();
      res.redirect('/home');
  });
  
  //login form submit as post
  
  app.post('/login',
      passport.authenticate('local', {
          successRedirect: '/dashboard',
          failureRedirect: '/home'
      })
      );
  
  app.get('/signup',routes.signup);
  app.get('*', routes.index);
  </code></pre>
  
  <p>How do i instruct JavaScript in my js file, to serve static files without routes?</p>