1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | const envVars = require("@erect/config/envVars");
|
10 | const listenAddress = envVars.string('LISTEN_ADDRESS', '0.0.0.0');
|
11 | const listenPort = envVars.number('LISTEN_PORT', 1337);
|
12 | let host;
|
13 | if (typeof process.env.HOST === 'undefined') {
|
14 | if (listenAddress === '0.0.0.0' || listenAddress === '127.0.0.1') {
|
15 | host = 'localhost';
|
16 | }
|
17 | else {
|
18 | host = listenAddress;
|
19 | }
|
20 | if (listenPort !== 80) {
|
21 | host = `${host}:${listenPort}`;
|
22 | }
|
23 | }
|
24 | else {
|
25 | host = process.env.HOST;
|
26 | }
|
27 | exports.defaultValues = {
|
28 | listenAddress,
|
29 | listenPort,
|
30 | host,
|
31 | disableSubscription: false,
|
32 | };
|
33 |
|
\ | No newline at end of file |