Middleware for defining default template locals in express 4