mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-23 22:27:34 -05:00
a1a70c973f
add es6 transpiled use case
19 lines
375 B
JavaScript
19 lines
375 B
JavaScript
function Plugin(config, stuff) {
|
|
const self = Object.create(Plugin.prototype);
|
|
|
|
self._config = config;
|
|
return self;
|
|
}
|
|
|
|
Plugin.prototype.register_middlewares = function (app, auth, storage) {
|
|
|
|
const {message} = this._config;
|
|
app.get('/test/route', function (req, res, next) {
|
|
res.status(200);
|
|
|
|
return next({ ok: message })
|
|
});
|
|
|
|
}
|
|
|
|
module.exports = Plugin;
|