diff --git a/package.json b/package.json index 7af1271..a9d4c13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name" : "cryptalk", - "version" : "1.1.14", + "version" : "1.1.15", "description" : "Encrypted HTML5/Node.JS instant chat", "main" : "server.js", "subdomain": "cryptalk", diff --git a/server.js b/server.js index 199ba3d..91215a1 100644 --- a/server.js +++ b/server.js @@ -1,4 +1,5 @@ #!/usr/bin/env node + const static = require('node-static'), port = process.env.PORT || 8080, @@ -13,8 +14,8 @@ var file = new static.Server(path.resolve(__dirname, 'public')); // Create http server, handle static assets -server = require('http').createServer(function (req) { - req.addListener('end', file.serve).resume(); +server = require('http').createServer(function (req, res) { + req.addListener('end', function () { file.serve(req, res); }).resume(); }); // Append socket.io to http server