1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
verdaccio/test/functional/fixtures/plugins/middlewares.js

18 lines
369 B
JavaScript
Raw Normal View History

module.exports = Plugin
function Plugin(config, stuff) {
var self = Object.create(Plugin.prototype)
self._config = config
return self
}
Plugin.prototype.register_middlewares = function (app, auth, storage) {
var message = this._config.message
app.get('/test/route', function (req, res, next) {
res.status(200)
return next({ ok: message })
});
}