title: Getting a request timeout on Heroku with passportJS
body: <p>I've been struggling with this all night but I haven't found an answer. I created an application which uses Passport JS for authentication. The users are saved in a MongoDB database, works perfectly on my local machine.</p>
  
  <p>For that reason, I attempted to upload the app on Heroku. I added the mlab add-on and imported the data from my local database. When I visit the mlab dashboard the data is there.</p>
  
  <p>The problem is that when I fill the form and hit enter, the app doesn't do anything and the in the console of the web browser the following error appears: "Failed to load resource: the server responded with a status of 503 (Service Unavailable)". I don't know what it's wrong and I need to fix it.</p>
  
  <p>Among all the things I've read I think that a possible error could be that I'm not using things like connect-redis or connect-mongo (don't know which is best) with express-session. This is my code (middlewares):</p>
  
  <pre><code>app.use(bodyParser.json())
  app.use(bodyParser.urlencoded({ extended: true }))
  app.use(cookieParser())
  app.use(session({
      name: 'session',
      secret: '53kre7',
      resave: false,
      saveUninitialized: true
  }))
  app.use(passport.initialize())
  app.use(passport.session())
  </code></pre>
  
  <p>So I really hope you can help me because I want to learn how to do it right. Thank you so much</p>