@webqit/webflo 0.8.63 → 0.8.65-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "vanila-javascript"
13
13
  ],
14
14
  "homepage": "https://webqit.io/tooling/webflo",
15
- "version": "0.8.63",
15
+ "version": "0.8.65-0",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -42,7 +42,9 @@ export default async function(Ui, flags = {}) {
42
42
 
43
43
  if (!setup.server.shared && setup.variables.autoload !== false) {
44
44
  Object.keys(setup.variables.entries).forEach(key => {
45
- process.env[key] = setup.variables.entries[key];
45
+ if (!(key in process.env) || setup.variables.autoload === 2) {
46
+ process.env[key] = setup.variables.entries[key];
47
+ }
46
48
  });
47
49
  }
48
50
 
@@ -119,7 +121,7 @@ export default async function(Ui, flags = {}) {
119
121
  } else {
120
122
  goOrForceHttps(setup, request, response);
121
123
  }
122
- }).listen(setup.server.port);
124
+ }).listen(process.env.PORT || setup.server.port);
123
125
 
124
126
  const goOrForceHttps = ($setup, $request, $response) => {
125
127
  if ($setup.server.https.force && !flags['http-only'] && /** main server */setup.server.https.port) {
@@ -184,7 +186,7 @@ export default async function(Ui, flags = {}) {
184
186
  }
185
187
  }
186
188
 
187
- httpsServer.listen(setup.server.https.port);
189
+ httpsServer.listen(process.env.PORT2 || setup.server.https.port);
188
190
  }
189
191
  };
190
192
 
@@ -39,7 +39,10 @@ export async function start(Ui, flags = {}, layout = {}) {
39
39
  Ui.log('');
40
40
  Ui.log(Ui.f`${'-------------------------------'}`);
41
41
  Ui.log('');
42
- const runtimeDetails = {HTTP: config.port, HTTPS: config.https.port || 0,};
42
+ const runtimeDetails = {
43
+ HTTP: process.env.PORT ? `${process.env.PORT} (Overriding ${config.port})` : config.port,
44
+ HTTPS: process.env.PORT2 ? `${process.env.PORT2} (Overriding ${config.https.port || 0})` : config.https.port || 0,
45
+ };
43
46
  if (config.shared) {
44
47
  runtimeDetails.MODE = 'Virtual Hosts';
45
48
  } else {
@@ -103,7 +106,7 @@ export async function start(Ui, flags = {}, layout = {}) {
103
106
  Ui.log('');
104
107
  showRunning(name, autorestart);
105
108
  }
106
- //Pm2.disconnect(resolve);
109
+ Pm2.disconnect(resolve);
107
110
  });
108
111
  }
109
112
  });