-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.development.js
45 lines (36 loc) · 1.48 KB
/
config.development.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
const query = require('query-string');
// NOTE: for a specific archive version, prefer using the path param. use
// this argument to use a completely different archive, such as archive-preview
// or localhost
const REACT_APP_ARCHIVE_URL_OVERRIDE = typeof(window) === 'undefined'
? undefined
: query.parse(window.location.search).archive
;
const UNLIMITED_CONTENT_QUERY = typeof(window) === 'undefined'
? undefined
: query.parse(window.location.search).validateLinks
;
const UNLIMITED_CONTENT_ENV = process.env.REACT_APP_UNLIMITED_CONTENT === undefined
? undefined
: process.env.REACT_APP_UNLIMITED_CONTENT !== 'false'
;
const UNLIMITED_CONTENT = UNLIMITED_CONTENT_QUERY === undefined
? UNLIMITED_CONTENT_ENV
: Boolean(UNLIMITED_CONTENT_QUERY)
;
module.exports = {
RELEASE_ID: 'development',
CODE_VERSION: 'development',
DEPLOYED_ENV: 'development',
REACT_APP_ARCHIVE_URL_OVERRIDE,
ACCOUNTS_URL: process.env.ACCOUNTS_URL || 'https://dev.openstax.org',
IMAGE_CDN_URL: process.env.IMAGE_CDN_URL || 'https://dev.openstax.org',
OS_WEB_URL: process.env.OS_WEB_URL || 'https://dev.openstax.org',
HIGHLIGHTS_URL: process.env.HIGHLIGHTS_URL || 'https://dev.openstax.org',
SEARCH_URL: process.env.SEARCH_URL || 'https://openstax.org',
SKIP_OS_WEB_PROXY: process.env.SKIP_OS_WEB_PROXY !== undefined,
FIXTURES: false,
DEBUG: true,
PORT: process.env.PORT ? parseInt(process.env.PORT, 10) : 8000,
UNLIMITED_CONTENT: UNLIMITED_CONTENT === undefined ? true : UNLIMITED_CONTENT
};