lambda-api icon indicating copy to clipboard operation
lambda-api copied to clipboard

Middleware integrations

Open jeremydaly opened this issue 7 years ago • 1 comments

Add support for other web framework middleware.

jeremydaly avatar Jun 11 '18 17:06 jeremydaly

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

eumpek avatar Feb 04 '19 08:02 eumpek