Saturday, 16 February 2019

Node.js: express: Middle ware function that executes on every request


If you define a middleware function like below, it executes for every greetMe request.
app.use("/greetMe", function (req, res, next) {
  console.log('Authorization successful to the user');
  next();
});


Previous                                                 Next                                                 Home

No comments:

Post a Comment