text: /* eslint-disable no-unused-vars */
  // Requiring path to so we can use relative routes to our HTML files
  const path = require("path");
  
  // Requiring our custom middleware for checking if a user is logged in
  const isAuthenticated = require("../config/middleware/isAuthenticated");
  
  module.exports = function(app) {
    app.get("/", (req, res) => {
      // If the user already has an account send them to the members page
      if (req.user) {
        res.renders("/members");
      }
      res.render("signup");
    });
  
    app.get("/login", (req, res) => {
      // If the user already has an account send them to the members page
      if (req.user) {
        res.redirect("/members");
      }
      res.render("login");
    });
  
    app.get("/stages", (req, res) => {
      // If the user already has an account send them to the members page
      if (req.user) {
        res.redirect("/members");
      }
      res.render("stages");
    });
  
    // Here we've add our isAuthenticated middleware to this route.
    // If a user who is not logged in tries to access this route they will be redirected to the signup page
    app.get("/members", isAuthenticated, (req, res) => {
      res.render("index");
    });
  };
  