Swap ecstatic for StaticServer

(closes #6342)
This commit is contained in:
Bryan Housel
2019-05-09 11:14:43 -04:00
parent 8bad3e2f4b
commit 5e21cec469
2 changed files with 6 additions and 8 deletions
+5 -7
View File
@@ -1,8 +1,7 @@
/* eslint-disable no-console */
const colors = require('colors/safe');
const ecstatic = require('ecstatic');
const gaze = require('gaze');
const http = require('http');
const StaticServer = require('static-server');
const isDevelopment = process.argv[2] === 'develop';
@@ -53,9 +52,8 @@ if (isDevelopment) {
});
});
http.createServer(
ecstatic({ root: __dirname, cache: 0 })
).listen(8080);
console.log(colors.yellow('Listening on :8080'));
const server = new StaticServer({ rootPath: __dirname, port: 8080, followSymlink: true });
server.start(function () {
console.log(colors.yellow('Listening on ' + server.port));
});
}
+1 -1
View File
@@ -64,7 +64,6 @@
"colors": "^1.1.2",
"concat-files": "^0.1.1",
"d3": "~5.9.2",
"ecstatic": "^4.1.2",
"editor-layer-index": "github:osmlab/editor-layer-index#gh-pages",
"eslint": "^5.16.0",
"gaze": "^1.1.1",
@@ -94,6 +93,7 @@
"sinon": "7.3.2",
"sinon-chai": "^3.1.0",
"smash": "0.0",
"static-server": "^2.2.1",
"svg-sprite": "1.5.0",
"temaki": "1.2.0",
"uglify-js": "~3.5.10"