|
|
|
@ -1,4 +1,5 @@ |
|
|
|
|
'use strict'; |
|
|
|
|
|
|
|
|
|
var AV = require('leanengine'); |
|
|
|
|
|
|
|
|
|
AV.init({ |
|
|
|
@ -21,9 +22,9 @@ app.listen(PORT, function (err) { |
|
|
|
|
|
|
|
|
|
// 注册全局未捕获异常处理器
|
|
|
|
|
process.on('uncaughtException', function(err) { |
|
|
|
|
console.error("Caught exception:", err.stack); |
|
|
|
|
console.error('Caught exception:', err.stack); |
|
|
|
|
}); |
|
|
|
|
process.on('unhandledRejection', function(reason, p) { |
|
|
|
|
console.error("Unhandled Rejection at: Promise ", p, " reason: ", reason.stack); |
|
|
|
|
console.error('Unhandled Rejection at: Promise ', p, ' reason: ', reason.stack); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|