attempt to put correct init in right place but could be wrong
This commit is contained in:
parent
603f251824
commit
c8b6d3b4f3
|
@ -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);
|
||||
|
@ -60,4 +61,4 @@ exports.restartServer = function () {
|
|||
hooks.callAll("expressCreateServer", {"app": server});
|
||||
|
||||
server.listen(settings.port, settings.ip);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue