I am perplexed by the fact that the example in the other file is not showing.
While working on a CRUD project with Mongo, Express, and Node, I encountered an issue. The code wasn't functioning as expected, so I paused to figure out why.
<!DOCTYPE html>
<html lang="en>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CRUD M.E.N.</title>
</head>
<body>
<p>Navigation</p>
{{ body }}
<p>Footer</p>
</body>
</html>
Routing code:
const router = require('express').Router();
router.get('/', (req, res) =>{
res.render('index')
})
router.get('/about', (req, res) =>{
res.render('about');
})
module.exports = router;
Index.js code
<p>HELLO</p>
https://i.stack.imgur.com/Pf8OE.png
I anticipate the 'body' to display the content from the index and about files.