-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathenv.js
26 lines (23 loc) · 905 Bytes
/
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
/**
* Whenever running in CI, we are setting the environment variables.
* In CI, we are using the container names as hostnames, when running locally,
* we access the frontend through `localhost:8888`, our reverse proxy.
* @type {string}
*/
const CY_STEMMAWEB_FRONTEND_URL =
process.env.CY_STEMMAWEB_FRONTEND_URL || 'http://localhost:8888/stemmaweb';
/**
* Whenever running in CI, we are setting the environment variables.
* In CI, we are using the container names as hostnames, when running locally,
* we access the middleware through `localhost:8888`, our reverse proxy.
* @type {string}
*/
const CY_STEMMAWEB_MIDDLEWARE_URL =
process.env.CY_STEMMAWEB_MIDDLEWARE_URL ||
'http://localhost:8888/stemmaweb/requests';
const CY_MODE = process.env.CY_STEMMAWEB_FRONTEND_URL ? 'headless' : 'headed';
module.exports = {
CY_MODE,
CY_STEMMAWEB_FRONTEND_URL,
CY_STEMMAWEB_MIDDLEWARE_URL
};