0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-03 23:09:17 -05:00
verdaccio/test/functional/fixtures/plugins/middlewares.js
Juan Picado 558fcafc71
build: format code prettier, enable ci (#2886)
* fix: format code prettier, enable ci

* chore: add trivago import prettier pluggin
2022-01-09 20:51:50 +01:00

18 lines
409 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;