2222
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
编码猿
2024-12-02 09:55:42 +08:00
parent 68057972cf
commit 5b486c5b21

10
app.js
View File

@@ -42,6 +42,16 @@ http.createServer(app).listen(config.port, "::",() => {
`) `)
}) })
// error handler
app.use(function(err, req, res, next) {
console.log(`
程序出现错误
status信息为${err.status}
message信息为${err.message}
error为${err}
`)
});
// app.listen(config.port, () => { // app.listen(config.port, () => {
// console.log(` // console.log(`