Question: Ive created a portfolio website for myself, there is a gallery which users can enter, click on a thumbnail and then go to a new html page with the full image and description. Now on this full image page i have a list of other fullimage pages for project 2,3,4,5, etc.. 

But obviously manually updating project2.html to have a list of all other projects minius project 2 in the sub nav is very tedious and mistakes will occus when i have to do it for all 12 plus pages. So im after the page people are viewing not to appear in that sub nav.

My problem is.. Do i scrap the custom html site and move onto a cms.. The logical step for this sort of dynamic nav. Or do i try and include php if possible. Can anyone suggest the best approach for this, im aware it might in the longrun be easier to run off a cms but i do like the control i get and knowledge i hand crafted my html.

Thanks
Mat

Answer: 
Firsl of all, ensure you are applying this middleware `(express.urlencoded)` before routes.

```
let app = express();

//response as Json
app.use(express.json()); 

//Parse x-www-form-urlencoded request into req.body
app.use(express.urlencoded({ extended: true }));     

app.post('/test',(req,res)=>{
    res.json(req.body);
});

```

The code `express.urlencoded({extended:true})` only responds to `x-www-form-urlencoded` **posts** requests, so in your **ajax/XMLHttpRequest/fetch**, make sure you are sending the `request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');` header.

Thats it !
What I did in my case is that I declared `app.use(express.json()); app.use(express.urlencoded({ extended: false }));` before my routes, and the issue got solved. I hope this helps you too!