Added expressServer hook to register new URLs

pull/528/head
Egil Moeller 2012-02-24 17:59:14 +01:00
parent 1ea5954a3b
commit 38e62274bc
1 changed files with 6 additions and 0 deletions

View File

@ -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();