title: How to set a page within a folder to the URL localhost: port-number?
body: <p>I currently access my login page typing in the following URL to my browser - '<a href="http://localhost:3000/pages/login" rel="nofollow noreferrer">http://localhost:3000/pages/login</a>'. The login page file is within a folder called 'pages'. I want to be able to be directed to the login page when I enter the following URL - '<a href="http://localhost:3000/" rel="nofollow noreferrer">http://localhost:3000/</a>'. I know this might be incredibly easy to some of you, but I am very new to this and I have became confused with the application I using. </p>
  
  <p>Here is my code below</p>
  
  <p>controller file</p>
  
  <pre><code>//renders the login.hbs page
  router.get('/login', (req, res) =&gt; {
      res.render('pages/login', {
          layout: 'main.hbs'
      });
  });
  </code></pre>
  
  <p>I tried changing the following code in numerous ways but it ended up giving me an error in which the page could not be found or trying to locate pages/pages/login. I am guessing if its in a folder 'pages' then this cant be done?</p>