forked from flyteorg/flyteconsole
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.js
48 lines (40 loc) · 1.49 KB
/
env.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* @file Provides environment variables
* Do not import this file into client/server code. Use common/env.ts instead
*/
/** Current environment environment. "development", "test" or "production" */
const NODE_ENV = process.env.NODE_ENV || 'development';
// If this is unset, API calls will default to the same host used to serve this app
const ADMIN_API_URL = process.env.ADMIN_API_URL;
const BASE_URL = process.env.BASE_URL || '';
const CORS_PROXY_PREFIX = process.env.CORS_PROXY_PREFIX || '/cors_proxy';
const CONFIG_DIR = process.env.CONFIG_DIR || './config';
const CONFIG_CACHE_TTL_SECONDS = process.env.CONFIG_CACHE_TTL_SECONDS || '60';
// Defines a file to be required which will provide implementations for
// any user-definable code.
const PLUGINS_MODULE = process.env.PLUGINS_MODULE;
// Optional URL which will provide information about system status. This is used
// to show informational banners to the user.
// If it has no protocol, it will be treated as relative to window.location.origin
const STATUS_URL = process.env.STATUS_URL;
const DISABLE_AUTH = process.env.DISABLE_AUTH;
module.exports = {
ADMIN_API_URL,
BASE_URL,
// Config env isn't sent to the client, so excluded from processEnv
CONFIG_CACHE_TTL_SECONDS,
CONFIG_DIR,
CORS_PROXY_PREFIX,
DISABLE_AUTH,
NODE_ENV,
PLUGINS_MODULE,
STATUS_URL,
processEnv: {
ADMIN_API_URL,
BASE_URL,
CORS_PROXY_PREFIX,
DISABLE_AUTH,
NODE_ENV,
STATUS_URL
}
};