const{ before }=require('expresshooks');asyncfunctionlogger(){// your code here....returntrue;}// Add before hook as middleware app.get("/",before(logger),function(req,res){returnres.send("Hello world");});
after
const{ after }=require('expresshooks');asyncfunctionlogger(response){// your code here...returntrue;}// Add after hook as middleware app.get("/",before(logger),function(req,res){returnres.send("Hello world");});