Open jporfirio opened 7 years ago
router.use works like app.use therefore one can chain middleware to authenticate specific routes https://expressjs.com/en/4x/api.html#router.use
maybe instead of using it on the router.use, use auth middleware on all put, delete and post requests on app.js (entry point) write line app.delete with all routes and etc
router.use works like app.use therefore one can chain middleware to authenticate specific routes https://expressjs.com/en/4x/api.html#router.use