title: From Express using EJS as view Engine, Can we redirect to a html page with socket.io implementation?
body: <p>I implemented socket.io with the following file in a folder.  </p>
  
  <blockquote>
    <p>app.js,socket.html</p>
  </blockquote>
  
  <p>I included twitter/Facebook/Google Authentication logic using (Express/Node/passport/EJS) in app.js.Once authentication is successful I am trying to redirect to socket.html to establish socket connection.  </p>
  
  <pre><code>    app.get('/auth/twitter/callback', 
      passport.authenticate('twitter', { failureRedirect: '/login' }),
      function(req, res) {
         res.redirect('/socket');
      });
      app.get('/socket', function(req, res){ res.redirect('/socket.html'); });
      app.use(express.static(__dirname));  
  </code></pre>
  
  <p>Since the authentication logic is in Express and uses EJS as view Engine, Is Redirecting the callback to a html page with socket connection possible ?  </p>
  
  <p>Socket works fine when its standalone.When I integrate passport.js for Authentication, I face this problem.
  The HTML page opens. But I get the following error. [Error] Failed to load resource: the server responded with a status of 404 (Not Found) localhost:3000/socket.io/socket.io.js </p>