minor refactor
This commit is contained in:
14
bin/ws.js
14
bin/ws.js
@ -27,6 +27,13 @@ function halt(message){
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
/* customised logger :date token, purely to satisfy Logstalgia. */
|
||||
morgan.token("date", function(){
|
||||
var a = new Date();
|
||||
return (a.getDate() + "/" + a.getUTCMonth() + "/" + a.getFullYear() + ":" + a.toTimeString())
|
||||
.replace("GMT", "").replace(" (BST)", "");
|
||||
});
|
||||
|
||||
/* Merge together options from
|
||||
- ~/.local-web-server.json
|
||||
- {cwd}/.local-web-server.json
|
||||
@ -74,13 +81,6 @@ if (argv.config){
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
/* customised logger :date token, purely to satisfy Logstalgia. */
|
||||
morgan.token("date", function(){
|
||||
var a = new Date();
|
||||
return (a.getDate() + "/" + a.getUTCMonth() + "/" + a.getFullYear() + ":" + a.toTimeString())
|
||||
.replace("GMT", "").replace(" (BST)", "");
|
||||
});
|
||||
|
||||
var app = connect();
|
||||
|
||||
/* log using --log-format (if supplied), else output statics */
|
||||
|
Reference in New Issue
Block a user