Separate development and production environments
Set NODE_ENV at run time or build time to switch the app between dev and production modes. At build time, the current NODE_ENV will be included in the packaged app's package.json file. At runtime we read NODE_ENV from package.json, but also allow the local environment variable to override. A query string parsed by a preload script exposes the value to the renderer, which then determines whether we use the staging or production server. Additionally, different environments have different user data directories. // FREEBIE
This commit is contained in:
parent
45bf7330ac
commit
2bbd0d58c6
4 changed files with 33 additions and 5 deletions
|
@ -39,6 +39,10 @@
|
|||
});
|
||||
|
||||
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_PORTS = [80, 4433, 8443];
|
||||
var messageReceiver;
|
||||
window.getSocketStatus = function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue