Essential expressJS middlewares and general middleware loader for Swint
Warning: This is not the final draft yet, so do not use this until its official version is launched
$ npm install --save swint-middlewaredir:String, default:path.dirname(require.main.filename)walkOption:Object, default:{ ext: 'js' }
var middlewares = loader({
dir: path.join(__dirname, 'middlewares')
}); // { middlewareA: [Function], middlewareB: [Function], ... }app.use(myMiddleware(options));myMiddleware()(notmyMiddlewareitself) gets three arguments, which isreq,res,next.