learning express step(十三)

learning express error handle

code:

const express = require('express');
const app = express();

app.get('/', function (req, res){
   throw  new  Error("BROKEN");
});

app.listen(3000);

result:

 

posted @ 2019-06-13 11:23  嵌入式实操  阅读(94)  评论(0编辑  收藏  举报