mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-17 07:45:52 +01:00
20 lines
407 B
JavaScript
20 lines
407 B
JavaScript
function Plugin(config, pluginOptions) {
|
|
const self = Object.create(Plugin.prototype);
|
|
|
|
self._config = config;
|
|
self._logger = pluginOptions.logger;
|
|
return self;
|
|
}
|
|
|
|
Plugin.prototype.register_middlewares = function (app) {
|
|
|
|
const {message} = this._config;
|
|
app.get('/test/route', function (req, res, next) {
|
|
res.status(200);
|
|
|
|
return next({ ok: message })
|
|
});
|
|
};
|
|
|
|
module.exports = Plugin;
|