Configure app/build using node config

Add environment-specific configs under `./config` and integrate with the
build system. Also changes package.json `files` from blacklist to
whitelist.

// FREEBIE
This commit is contained in:
lilia 2017-04-10 00:22:38 -07:00 committed by Scott Nonnenberg
parent 34042415e9
commit 7e1bee1082
No known key found for this signature in database
GPG key ID: A4931C09644C654B
7 changed files with 59 additions and 32 deletions

View file

@ -9,6 +9,7 @@
};
console.log('background page reloaded');
console.log('NODE_ENV', window.env.NODE_ENV);
extension.notification.init();
// Close and reopen existing windows
@ -38,11 +39,7 @@
});
});
var SERVER_URL = 'https://textsecure-service-staging.whispersystems.org';
if (window.env && window.env.node_env === 'production') {
SERVER_URL = 'https://textsecure-service-ca.whispersystems.org';
}
var SERVER_URL = env.SERVER_URL;
var SERVER_PORTS = [80, 4433, 8443];
var messageReceiver;
window.getSocketStatus = function() {