0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/packages/middleware/test/helper.ts
Juan Picado a1986e098d
feat: expose middleware utils (#3580)
* feat: expose middleware utils

* feat: expose middleware utils

* Update antiLoop.ts

* Update e2e-ci.yml
2023-01-29 15:08:50 +01:00

14 lines
284 B
TypeScript

import express from 'express';
export const getApp = (middlewares = []) => {
const app = express();
middlewares.map((middleware) => {
app.use(middleware);
});
// app.get('/', function (req, res) {
// res.status(200).json({ name: 'pkg' });
// });
return app;
};