From 5bd78f5ecc3e6a1e088f5ccb5ddb9197b5e43bad Mon Sep 17 00:00:00 2001 From: Matthijs van Henten Date: Thu, 21 May 2015 23:41:09 +0000 Subject: [PATCH] adds a mount feature to frontdoor: mount sections into the existing chain --- node_modules/frontdoor/lib/section.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/node_modules/frontdoor/lib/section.js b/node_modules/frontdoor/lib/section.js index 1e8edbfa..9d482dcc 100644 --- a/node_modules/frontdoor/lib/section.js +++ b/node_modules/frontdoor/lib/section.js @@ -70,6 +70,13 @@ module.exports = function Section(name, description, types) { return section; }; + this.mount = function( name, section ){ + if (!sections[name]) + sections[name] = []; + + sections[name].push(section); + }; + this._rootHandler = function(req, res) { this.handle(req, res, function(err) { if (err) {