Faça do nó de consulta Param Opcional
app.get('/user/:id?', function userIdHandler (req, res) {
console.log(req.route)
res.send('GET')
})
Grumpy Gentoo
app.get('/user/:id?', function userIdHandler (req, res) {
console.log(req.route)
res.send('GET')
})