Skip to content

Commit

Permalink
Removed the sevrving of static files on the express server.
Browse files Browse the repository at this point in the history
Only start listening if the express app is created inside of acequia
  • Loading branch information
prgsmall committed Jul 10, 2012
1 parent d363b31 commit 269d59d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/acequia.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,22 +261,16 @@ AcequiaServer.prototype.createWSServer = function () {

if (!this.options.express_app) {
this.options.express_app = express.createServer();
this.options.express_app.listen(this.options.wsPort);
}
app = this.options.express_app;

app.configure(function(){
app.use(express["static"](__dirname + '/../test'));
app.use(express.methodOverride());
app.use(express.bodyParser());
app.use(app.router);
});

app.listen(this.options.wsPort);

app.get('/', function (req, res) {
res.render('index.html');
});

app.get('/acequia/*', function (req, res) {
var pathName = url.parse(req.url, true).pathname,

Expand Down

0 comments on commit 269d59d

Please sign in to comment.