psychobunny 12 years ago
commit db8140a1b6

15
.gitignore vendored

@ -1,7 +1,8 @@
################# #################
## npm ## npm
################# #################
npm-debug.log npm-debug.log
node_modules/ node_modules/
sftp-config.json sftp-config.json
public/config.json

@ -0,0 +1,6 @@
{
"socket" : {
"address" : "localhost",
"port" : "4567"
}
}

@ -1,6 +0,0 @@
{
"socket" : {
"address" : "198.199.80.41",
"port" : "8081"
}
}

@ -1,7 +1,8 @@
var express = require('express'), var express = require('express'),
WebServer = express(),
server = require('http').createServer(WebServer),
connect = require('connect'), connect = require('connect'),
config = require('../config.js'), config = require('../config.js');
WebServer = express();
(function(app) { (function(app) {
var templates = global.templates; var templates = global.templates;
@ -38,8 +39,9 @@ var express = require('express'),
app.use(express.static(global.configuration.ROOT_DIRECTORY + '/public')); app.use(express.static(global.configuration.ROOT_DIRECTORY + '/public'));
app.set('mailOptions', config.mailer); app.set('mailOptions', config.mailer);
}); });
app.listen(config.port);
} }
}(WebServer)); }(WebServer));
server.listen(config.port);
global.server = server;

@ -1,5 +1,5 @@
var SocketIO = require('socket.io').listen(8081); var SocketIO = require('socket.io').listen(global.server);
(function(io) { (function(io) {

Loading…
Cancel
Save