static was used as variable name, not ok. Release 1.1.17

This commit is contained in:
Hexagon 2017-01-23 23:42:03 +01:00
parent 721e80aa1f
commit 9583845466
2 changed files with 5 additions and 6 deletions

View File

@ -1,7 +1,6 @@
{ {
"name" : "cryptalk", "name" : "cryptalk",
"version" : "1.1.16", "version" : "1.1.17777777description" : "Encrypted HTML5/Node.JS instant chat",
"description" : "Encrypted HTML5/Node.JS instant chat",
"main" : "server.js", "main" : "server.js",
"subdomain": "cryptalk", "subdomain": "cryptalk",
"analyze": true, "analyze": true,

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node #!/usr/bin/env node
const const
static = require('node-static'), files = require('node-static'),
port = process.env.PORT || 8080, port = process.env.PORT || 8080,
path = require('path'); path = require('path');
@ -10,10 +10,10 @@ var
server, server,
io; io;
// Set up static file location // Set up files.file location
file = new static.Server(path.resolve(__dirname, 'public')); file = new files.Server(path.resolve(__dirname, 'public'));
// Create http server, handle static assets // Create http server, handle files.assets
server = require('http').createServer(function (req, res) { server = require('http').createServer(function (req, res) {
req.addListener('end', function () { file.serve(req, res); }).resume(); req.addListener('end', function () { file.serve(req, res); }).resume();
}); });