Express app.locals
documentation
// At init time
app.locals.crypto = require('crypto')
// A middleware for values that change with each request
function attachReq(req,res,next) {
res.locals.req = req
res.locals.util = require('util')
next()
}
app.use(attachReq)