You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
486 B
JavaScript
29 lines
486 B
JavaScript
const defaultConfig = {
|
|
"port": 8082,
|
|
"bodyLimit": "10mb",
|
|
"crawlPath": "/usr/data",
|
|
"apiUrl": "http://serviceapi:8080",
|
|
"ignoreFolders": "**/test/**",
|
|
"ignoreExtensions": ".{exe,dll}",
|
|
"ignoreFileNames": "~*",
|
|
"name": "localhost",
|
|
"maxFileSize": "300mb",
|
|
"rabbitHost": "amqp://rabbit"
|
|
}
|
|
|
|
let config = null
|
|
|
|
const init = () => {
|
|
config = { ...defaultConfig, ...process.env }
|
|
|
|
return config
|
|
}
|
|
|
|
export default (() => {
|
|
return config === null
|
|
? init()
|
|
: config
|
|
})()
|
|
|
|
|