by Gigablah · 12y ago · 0 comments
https://github.com/codegangsta/martini#next
// log before and after a request
m.Use(func(c martini.Context, log *log.Logger){
log.Println("before a request")
c.Next()
log.Println("after a request")
}) function(req, res, next) {
console.log('before');
next(); // go to the next middleware handler
console.log('after the middleware stack has been traversed');
}Or for any Scheme for the last 30 years, but don't let that change your views on how "modern" you language is :)