Skip to content

Commit

Permalink
Update connect and static middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolashery committed Aug 7, 2014
1 parent 20ef65e commit 4577f16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"async": "0.9.0",
"bower": "1.3.8",
"bows": "0.5.0",
"connect": "2.14.3",
"connect": "3.1.0",
"css-loader": "0.7.0",
"director": "1.2.2",
"envify": "1.2.1",
Expand All @@ -41,6 +41,7 @@
"reactify": "0.10.0",
"run-sequence": "0.3.6",
"rx": "2.2.18",
"serve-static": "1.5.0",
"shelljs": "0.3.0",
"simple-glob": "0.1.0",
"style-loader": "0.6.4",
Expand Down
6 changes: 4 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
var http = require('http');
var https = require('https');
var path = require('path');
var connect = require('connect');
var serveStatic = require('serve-static');

var config = require('./env.js');

var buildDir = 'dist';

var app = connect();

var staticDir = __dirname + '/' + buildDir;
app.use(connect.static(staticDir));
var staticDir = path.join(__dirname, buildDir);
app.use(serveStatic(staticDir));

// If no ports specified, just start on default HTTP port
if (!(config.httpPort || config.httpsPort)) {
Expand Down

0 comments on commit 4577f16

Please sign in to comment.