Skip to content

Commit

Permalink
Switch to connect
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwredfish committed Dec 24, 2015
1 parent ee32be2 commit aa1c0e4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
17 changes: 16 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/**',
Expand Down
10 changes: 4 additions & 6 deletions server.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit aa1c0e4

Please sign in to comment.