attempt to put correct init in right place but could be wrong

This commit is contained in:
johnyma22 2012-09-12 19:38:53 +01:00
parent 603f251824
commit c8b6d3b4f3
1 changed files with 3 additions and 2 deletions

View File

@ -42,12 +42,13 @@ exports.createServer = function () {
}
exports.restartServer = function () {
if (server) {
console.log("Restarting express server");
server.close();
}
server = express.createServer();
server = express(); // New syntax for express v3
server.use(function (req, res, next) {
res.header("Server", serverName);