Using environment variables to set the firebase-public url

This commit is contained in:
Chris Raynor
2015-10-11 19:04:13 -07:00
committed by Michael Bleigh
parent d4f5a4addf
commit 0fdb8d2a8e

View File

@@ -6,6 +6,8 @@ var _ = require('lodash');
var pkg = require('../package.json');
var semver = require('semver');
var chalk = require('chalk');
var utils = require('./utils');
var api = require('./api');
var ONE_DAY_MS = 1000 * 60 * 60 * 24;
@@ -38,13 +40,13 @@ module.exports = function() {
}
} else {
request({
url: 'https://firebase-public.firebaseio.com/cli.json',
url: utils.addSubdomain(api.realtimeOrigin, 'firebase-public') + '/cli.json',
json: true
}, function(err, res, body) {
if (err) {
return;
}
motd = _.assign({minVersion: '3.0.1'}, body);
motd = _.assign({}, body);
configstore.set('motd', motd);
configstore.set('motd.fetched', Date.now());
});