node-framework
Version:
node-framework
30 lines (27 loc) • 555 B
JavaScript
/**
* @file monitor.js
* @author wangyisheng@baidu.com (wangyisheng)
* @description
* 用作测试监控
**/
module.exports = {
normal: function (req, res) {
res.send('normal');
},
error: function (req, res) {
setTimeout(
function () {
throw new Error();
},
20
)
},
responseWarning: function (req, res) {
setTimeout(
function () {
res.send('response in 1000ms');
},
1000
);
}
};