add option to pass locals to server module

Added an option to pass [locals](http://expressjs.com/4x/api.html#app.locals) to a server module.