Skip to content

Commit aa1c0e4

Browse files
committed
Switch to connect
1 parent ee32be2 commit aa1c0e4

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

gulpfile.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,23 @@ gulp.task('clean:release', ['build'], function() {
418418

419419
gulp.task('copy:release', ['copy:dist'], function() {
420420
return gulp.src([
421-
'./node_modules/node-static/**',
421+
'./node_modules/connect/**',
422+
'./node_modules/buffer-crc32/**',
423+
'./node_modules/fresh/**',
424+
'./node_modules/bytes/**',
425+
'./node_modules/cookie/**',
426+
'./node_modules/cookie-signature/**',
422427
'./node_modules/mime/**',
428+
'./node_modules/debug/**',
429+
'./node_modules/depd/**',
430+
'./node_modules/finalhandler/**',
431+
'./node_modules/on-headers/**',
432+
'./node_modules/parseurl/**',
433+
'./node_modules/range-parser/**',
434+
'./node_modules/serve-static/**',
435+
'./node_modules/type-is/**',
436+
'./node_modules/send/**',
437+
423438
'./node_modules/colors/**',
424439
'./node_modules/optimist/**',
425440
'./node_modules/electron-window-state/**',

server.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
'use strict';
22
const PORT = 9100;
3-
var nStatic = require('node-static'),
4-
http = require('http'),
5-
file = new nStatic.Server('./dist');
3+
var connect = require('connect');
64

7-
http.createServer(function(req, res) {
8-
file.serve(req, res);
9-
}).listen(PORT);
5+
connect()
6+
.use(connect.static(__dirname + '/dist'))
7+
.listen(PORT);
108

119
console.log('Server is running on port: ' + PORT);

0 commit comments

Comments
 (0)