From aa1c0e4f7d0ac831938979293bba5d1455cd37d3 Mon Sep 17 00:00:00 2001 From: wwwredfish Date: Thu, 24 Dec 2015 19:33:21 +0600 Subject: [PATCH] Switch to connect --- gulpfile.js | 17 ++++++++++++++++- server.js | 10 ++++------ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 4bf4b1aca..49c1cf49e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -418,8 +418,23 @@ gulp.task('clean:release', ['build'], function() { gulp.task('copy:release', ['copy:dist'], function() { return gulp.src([ - './node_modules/node-static/**', + './node_modules/connect/**', + './node_modules/buffer-crc32/**', + './node_modules/fresh/**', + './node_modules/bytes/**', + './node_modules/cookie/**', + './node_modules/cookie-signature/**', './node_modules/mime/**', + './node_modules/debug/**', + './node_modules/depd/**', + './node_modules/finalhandler/**', + './node_modules/on-headers/**', + './node_modules/parseurl/**', + './node_modules/range-parser/**', + './node_modules/serve-static/**', + './node_modules/type-is/**', + './node_modules/send/**', + './node_modules/colors/**', './node_modules/optimist/**', './node_modules/electron-window-state/**', diff --git a/server.js b/server.js index 80c3e0fbe..5d7c6a6a4 100644 --- a/server.js +++ b/server.js @@ -1,11 +1,9 @@ 'use strict'; const PORT = 9100; -var nStatic = require('node-static'), - http = require('http'), - file = new nStatic.Server('./dist'); +var connect = require('connect'); -http.createServer(function(req, res) { - file.serve(req, res); -}).listen(PORT); +connect() +.use(connect.static(__dirname + '/dist')) +.listen(PORT); console.log('Server is running on port: ' + PORT);