var express = require("express");
var server = express();
var domain = require('domain');
var pattern = "/diagnosis/account";
var d = domain.create();
d.on('error', function() {
console.log('catch ex');
});
d.add(server);
d.run(function(){
var app = server.all(pattern + '/logout', function() {
throw new Error();
});
d.add(app);
});
server.listen(1377);
console.log("server start in 1377")
访问的时候还是抛了异常