BackendStack21 / restana

Restana is a lightweight and fast Node.js framework for building RESTful APIs.
MIT License
467 stars 27 forks source link

Express like route middlewares #20

Closed jkyberneees closed 5 years ago

jkyberneees commented 5 years ago

Supporting express.js like route middlewares. Feature request https://github.com/jkyberneees/ana/issues/16

Example:

service.get('/hi/:name', (req, res, next) => {
  req.params.name = req.params.name.toUpperCase()
  next()
}, async (req, res) => {
  return 'Hello ' + req.params.name
})