Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.use(async (ctx, next) => {
- try {
- await next();
- }
- catch (error) {
- console.log(error);
- }
- });
- app.use(bodyParser());
- const router = new KoaRouter();
- router.get('/', () => throw new Error('test'));
- app.use(router.routes());
Add Comment
Please, Sign In to add comment