projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Experimental symmetric randomness + deterministic option
[vchess.git]
/
server
/
app.js
diff --git
a/server/app.js
b/server/app.js
index
4f9d167
..
eced7d3
100644
(file)
--- a/
server/app.js
+++ b/
server/app.js
@@
-54,17
+54,13
@@
app.use(function(req, res, next) {
// error handler
app.use(function(err, req, res, next) {
// error handler
app.use(function(err, req, res, next) {
- // set locals, only providing error in development
- res.locals.message = err.message;
- res.locals.error = (req.app.get('env') === 'development' ? err : {});
- // render the error page
res.status(err.status || 500);
res.status(err.status || 500);
- res.send(`
- <!doctype html>
- <h1>= message</h1>
- <h2>= error.status</h2>
- <pre>#{error.stack}</pre>
-
`
);
+ if (app.get('env') === 'development')
+ console.log(err.stack);
+ res.send(
+ "<h1>" + err.message + "</h1>" +
+ "<h2>" + err.status + "</h2>"
+ );
});
module.exports = app;
});
module.exports = app;