Sticker Creator

This commit is contained in:
Ken Powers 2019-12-17 15:25:57 -05:00 committed by Scott Nonnenberg
parent 2df1ba6e61
commit 11d47a8eb9
123 changed files with 11287 additions and 1714 deletions

View file

@ -1,11 +1,10 @@
const path = require('path');
const electronIsDev = require('electron-is-dev');
const { app } = require('electron');
let environment;
// In production mode, NODE_ENV cannot be customized by the user
if (electronIsDev) {
if (!app.isPackaged) {
environment = process.env.NODE_ENV || 'development';
} else {
environment = 'production';
@ -24,12 +23,14 @@ if (environment === 'production') {
process.env.ALLOW_CONFIG_MUTATIONS = '';
process.env.SUPPRESS_NO_CONFIG_WARNING = '';
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '';
process.env.SIGNAL_ENABLE_HTTP = '';
}
// We load config after we've made our modifications to NODE_ENV
const config = require('config');
config.environment = environment;
config.enableHttp = process.env.SIGNAL_ENABLE_HTTP;
// Log resulting env vars in use by config
[
@ -40,6 +41,7 @@ config.environment = environment;
'HOSTNAME',
'NODE_APP_INSTANCE',
'SUPPRESS_NO_CONFIG_WARNING',
'SIGNAL_ENABLE_HTTP',
].forEach(s => {
console.log(`${s} ${config.util.getEnv(s)}`);
});