changing the way the express app is instantiated

v1.18.x
Julian Lam 12 years ago
parent 302d1a3131
commit d035307d8b

@ -113,7 +113,7 @@
} }
</style> </style>
<script> <script>
var socket = io.connect('http://198.199.80.41:8081'); var socket = io.connect('http://198.58.101.18:8081');
socket.on('event:connect', function(data) { socket.on('event:connect', function(data) {

@ -1,11 +1,11 @@
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;
global.app = app;
app.get('/test', function(req, res) { app.get('/test', function(req, res) {
var body = 'testing'; var body = 'testing';
@ -39,8 +39,8 @@ 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);

Loading…
Cancel
Save