minor refactor
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
[](https://www.npmjs.org/package/local-web-server)
|
||||

|
||||
[](https://www.npmjs.org/package/local-web-server)
|
||||
[](https://david-dm.org/75lb/local-web-server)
|
||||

|
||||
|
||||
|
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 */
|
||||
|
6
lib/stats.js
Normal file
6
lib/stats.js
Normal file
@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
exports.requests = 0;
|
||||
exports.transferred = 0;
|
||||
exports.requests = 0;
|
||||
exports.requests = 0;
|
Reference in New Issue
Block a user