Skip to content

Commit

Permalink
default hostname property
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Spasic authored and Vladimir Spasic committed Jun 13, 2016
1 parent 471b0a9 commit 2714e80
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ module.exports = EventEmitter.extend({
}
},

/**
* Server hostname address
*
* @property hostname
* @type {String}
*/
hostname: undefined,

/**
* Set the port number for the Server
*
Expand Down Expand Up @@ -137,11 +145,15 @@ module.exports = EventEmitter.extend({
/**
* Returns the hostname to be used by the Server.
*
* You can either set the `hostname` property when extending this
* module or set a `server.hostname` environment property
* in your configuration files.
*
* @method getHostname
* @return {String}
*/
getHostname: function() {
return this.registry.environment.get('hostname');
return this.registry.environment.get('server.hostname', this.hostname);
},

/**
Expand Down

0 comments on commit 2714e80

Please sign in to comment.