Skip to content

Example of route specific middleware

Christian Fritz edited this page Mar 5, 2021 · 1 revision

Example of how to use route-specific middleware:

const m = bodyParser.urlencoded({ extended: false });
Picker.route('/test', (param, req, res, next) => m(req, res, () => {
  console.log('/test', req.body);
  res.end();
}));
Clone this wiki locally