UNPKG

@contentacms/contentajs

Version:

A nodejs server that proxies to Contenta CMS and holds custom code.

14 lines (13 loc) 335 B
"use strict"; /** * Returns a middleware that will copy all of the properties to the request. * * This is useful to store variables that will be used in any arbitrary * middleware down the process. */ module.exports = args => (req, res, next) => { Object.keys(args).forEach(key => { req[key] = args[key]; }); next(); };