Updates to configuration documentation

This commit is contained in:
Philip Dimitratos 2017-09-08 15:27:48 -07:00
Родитель 119a19f2ea
Коммит 7a2e3becae
3 изменённых файлов: 30 добавлений и 0 удалений

Просмотреть файл

@ -8,6 +8,9 @@ It is built using:
It is configured for Wepback's hot module reloading, so as things change they should automatically appear in your browser.
# Before You Start
You will need to add const files in config for each environment you want to use; these are not tracked in git. See cfg.constExample.js for more details. Const files follow the naming convention $env.const.js (localhost.const.js is the const file loaded by localhost.js, for example)
# To start
+ Have Node.js installed (the latest LTS release is preferred)
+ Create a localhost.const.js file inside the cfg folder. Use the example.const.js file as a template.

16
cfg/constExample.js Normal file
Просмотреть файл

@ -0,0 +1,16 @@
let defaultConstants = require('./defaultConstants')
//Override base constants or add additional constants for this environment
module.exports = Object.assign({}, defaultConstants, {
baseUrl: JSON.stringify("http://localhost:60000/"), //Host on a different port
retries: 4 //retry failed requests more times before giving up
})
/* Copy this to a new file to create const file that just uses default constants
let defaultConstants = require('./defaultConstants')
module.exports = Object.assign({}, defaultConstants)
*/

11
cfg/defaultConstants.js Normal file
Просмотреть файл

@ -0,0 +1,11 @@
module.exports = {
baseUrl: JSON.stringify("http://localhost:50000/"),
authRedirectUri: JSON.stringify("http://localhost:3000"),
retries: 2,
retryExponentialBackoffFactor: 2,
retryMinTimeoutInMiliseconds: 50,
retryMaxTimeoutInMiliseconds: 1500,
ticketRefreshIntervalInSeconds: 300,
aadTenant: "'Your Azure Active Directory tenant here'", //Yes, use both single and double quotes.
clientId: "'Your EventUI Azure Active Directory app registration client ID here'"
}