Skip to content

Commit

Permalink
feat(app): intrduced api to add the middlewares to the app
Browse files Browse the repository at this point in the history
  • Loading branch information
tirthaguha committed Aug 21, 2021
1 parent 3ee2ef9 commit 4079e77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/app/lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ const registerMultipleRoutes = (app, routes) => {
});
};

module.exports = { createApp, registerRoute, registerMultipleRoutes };
const addMiddleware = (app, middleware) => {
app.use(middleware);
}

module.exports = { createApp, registerRoute, registerMultipleRoutes, addMiddleware };

0 comments on commit 4079e77

Please sign in to comment.