I am using Node.js and Express and I have the following routing :
app.get(\'/\', function(req,res){ locals.date = new Date().toLocaleDateString(); r
The connect-slashes middleware was designed specifically for this need: https://npmjs.org/package/connect-slashes
Install it with:
$ npm install connect-slashes
Read the full documentation: https://github.com/avinoamr/connect-slashes