Added expressServer hook to register new URLs
parent
1ea5954a3b
commit
38e62274bc
|
@ -32,6 +32,8 @@ var express = require('express');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var minify = require('./utils/Minify');
|
var minify = require('./utils/Minify');
|
||||||
var formidable = require('formidable');
|
var formidable = require('formidable');
|
||||||
|
var plugins = require("./pluginfw/plugins");
|
||||||
|
var hooks = require("./pluginfw/hooks");
|
||||||
var apiHandler;
|
var apiHandler;
|
||||||
var exportHandler;
|
var exportHandler;
|
||||||
var importHandler;
|
var importHandler;
|
||||||
|
@ -68,6 +70,8 @@ exports.maxAge = 1000*60*60*6;
|
||||||
log4js.setGlobalLogLevel(settings.loglevel);
|
log4js.setGlobalLogLevel(settings.loglevel);
|
||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
|
plugins.update,
|
||||||
|
|
||||||
//initalize the database
|
//initalize the database
|
||||||
function (callback)
|
function (callback)
|
||||||
{
|
{
|
||||||
|
@ -79,6 +83,8 @@ async.waterfall([
|
||||||
//create server
|
//create server
|
||||||
var app = express.createServer();
|
var app = express.createServer();
|
||||||
|
|
||||||
|
hooks.callAll("expressServer", {"app": app});
|
||||||
|
|
||||||
app.use(function (req, res, next) {
|
app.use(function (req, res, next) {
|
||||||
res.header("Server", serverName);
|
res.header("Server", serverName);
|
||||||
next();
|
next();
|
||||||
|
|
Loading…
Reference in New Issue