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

10 lines
220 B
JavaScript

module.exports = function(options) {
return function(req, res, next) {
const packageJson = require('../../../package.json');
res.set('Salix-Version', packageJson.version);
next();
};
};