Node, Express - CANNOT GET route
let me quote from express doc:
A route will match any path that follows its path immediately with a “/”. For example: app.use('/apple', ...) will match “/apple”, “/apple/images”, “/apple/images/news”, and so on. see express doc
this is "not working" because you set the /about
in the app.use
and in the router.get
. try to request /about/about
and you will see that this is working (just not as you wanted to)..
now just change the /about
in the routes/about.js
then rerun and try to request /about
and it will work :)
Your route is set to /about/about
.Change about.js
to this:
const express = require('express');const router = express.Router();router.get('/', function(req, res) { res.render('app/about');});module.exports = router;