Static file serving were broken. Release 1.1.15
This commit is contained in:
parent
005ad02f68
commit
9e16242c2c
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name" : "cryptalk",
|
"name" : "cryptalk",
|
||||||
"version" : "1.1.14",
|
"version" : "1.1.15",
|
||||||
"description" : "Encrypted HTML5/Node.JS instant chat",
|
"description" : "Encrypted HTML5/Node.JS instant chat",
|
||||||
"main" : "server.js",
|
"main" : "server.js",
|
||||||
"subdomain": "cryptalk",
|
"subdomain": "cryptalk",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const
|
const
|
||||||
static = require('node-static'),
|
static = require('node-static'),
|
||||||
port = process.env.PORT || 8080,
|
port = process.env.PORT || 8080,
|
||||||
|
@ -13,8 +14,8 @@ var
|
||||||
file = new static.Server(path.resolve(__dirname, 'public'));
|
file = new static.Server(path.resolve(__dirname, 'public'));
|
||||||
|
|
||||||
// Create http server, handle static assets
|
// Create http server, handle static assets
|
||||||
server = require('http').createServer(function (req) {
|
server = require('http').createServer(function (req, res) {
|
||||||
req.addListener('end', file.serve).resume();
|
req.addListener('end', function () { file.serve(req, res); }).resume();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Append socket.io to http server
|
// Append socket.io to http server
|
||||||
|
|
Loading…
Reference in New Issue