salix/loopback/server/middleware/salix-version.js

9 lines
219 B
JavaScript
Raw Permalink Normal View History

2024-02-02 08:49:39 +00:00
const packageJson = require(`${process.cwd()}/package.json`);
module.exports = function(options) {
return function(req, res, next) {
res.set('Salix-Version', packageJson.version);
next();
};
};