From 0fdb8d2a8e2b796779fce16cfc248bcc00e87dcf Mon Sep 17 00:00:00 2001 From: Chris Raynor Date: Sun, 11 Oct 2015 19:04:13 -0700 Subject: [PATCH] Using environment variables to set the firebase-public url --- lib/fetchMOTD.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/fetchMOTD.js b/lib/fetchMOTD.js index 57637eca..fb95f5ba 100644 --- a/lib/fetchMOTD.js +++ b/lib/fetchMOTD.js @@ -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()); });