Skip to content

Commit

Permalink
Deprecate sails.getBaseUrl(), make private version for use in initial…
Browse files Browse the repository at this point in the history
… lift message
  • Loading branch information
sgress454 committed Jan 28, 2016
1 parent c663646 commit 386b68f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/app/Sails.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ Sails.prototype.lift = require('./lift');

Sails.prototype.lower = require('./lower');

Sails.prototype.getBaseurl = require('./getBaseurl');
Sails.prototype._getBaseUrl = require('./getBaseurl');
Sails.prototype.getBaseurl = function() {
this.log.warn("sails.getBaseUrl() is deprecated and will be removed in Sails v1.0. See http://sailsjs.org/documentation/reference/application/sails-getbaseurl for more info.");
return this._getBaseUrl();
};
Sails.prototype.getBaseURL = Sails.prototype.getBaseurl;
Sails.prototype.getBaseUrl = Sails.prototype.getBaseurl;

Expand Down
2 changes: 1 addition & 1 deletion lib/app/lift.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function _printSuccessMsg(sails) {

sails.log.ship && sails.log.ship();
sails.log.info(('Server lifted in `' + sails.config.appPath + '`'));
sails.log.info(('To see your app, visit ' + (sails.getBaseurl() || '').underline));
sails.log.info(('To see your app, visit ' + (sails._getBaseUrl() || '').underline));
sails.log.info(('To shut down Sails, press <CTRL> + C at any time.'));
sails.log.blank();
sails.log('--------------------------------------------------------'.grey);
Expand Down

0 comments on commit 386b68f

Please sign in to comment.