From 38e62274bc7bce9755d655125b7bb2d106085fea Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Fri, 24 Feb 2012 17:59:14 +0100 Subject: [PATCH] Added expressServer hook to register new URLs --- node/server.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/node/server.js b/node/server.js index a6a57497a..804a1ad87 100644 --- a/node/server.js +++ b/node/server.js @@ -32,6 +32,8 @@ var express = require('express'); var path = require('path'); var minify = require('./utils/Minify'); var formidable = require('formidable'); +var plugins = require("./pluginfw/plugins"); +var hooks = require("./pluginfw/hooks"); var apiHandler; var exportHandler; var importHandler; @@ -68,6 +70,8 @@ exports.maxAge = 1000*60*60*6; log4js.setGlobalLogLevel(settings.loglevel); async.waterfall([ + plugins.update, + //initalize the database function (callback) { @@ -79,6 +83,8 @@ async.waterfall([ //create server var app = express.createServer(); + hooks.callAll("expressServer", {"app": app}); + app.use(function (req, res, next) { res.header("Server", serverName); next();