Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Server.prototype.getApplication = function(hostname) {
* @param {Function} callback Function to run when the application is started.
*/
Server.prototype.addApplication = function(hostname, dir, callback) {
var server = this;
var modes = [];
var mergingSettings = [];
var applicationPaths = {
Expand Down Expand Up @@ -169,6 +170,9 @@ Server.prototype.addApplication = function(hostname, dir, callback) {
// Load and merge all the settings.
lodash.merge.apply(null, [settings].concat(mergingSettings));

// Allow for custom changes on settings.
server.emit('applicationSettings', hostname, settings);

var application = this.applications[hostname] = new Application(this.mainApplication, hostname, settings);

// Add a reference to the server to be used by the installer.
Expand Down