Switched to hyper express

This commit is contained in:
SamTv12345 2024-08-19 15:22:11 +02:00
parent 3c66e8c5d6
commit fd9b5d0ff3
8 changed files with 84 additions and 67 deletions

View file

@ -9,14 +9,14 @@ exports.expressCreateServer = (hook_name:string, args: ArgsExpressType, cb:Funct
exports.app = args.app;
// Handle errors
args.app.use((err:ErrorCaused, req:any, res:any, next:Function) => {
/*args.app.use((req:any, res:any, next:Function) => {
// if an error occurs Connect will pass it down
// through these "error-handling" middleware
// allowing you to respond however you like
res.status(500).send({error: 'Sorry, something bad happened!'});
console.error(err.stack ? err.stack : err.toString());
stats.meter('http500').mark();
});
});*/
return cb();
};