lambda-api
lambda-api copied to clipboard
Middleware integrations
Add support for other web framework middleware.
Hello, i am trying to use Method-based middleware but i get the following error
next is not a function
Here is the code:
const fetchUser = (req, res, next) => { next(); });
app.get('/comment/:id', fetchUser, (req, res) => { res.send(req.params.id); });
The Generic Middleware approach works fine. Do you have any clue about this ? Thanks