dae22f393c
titles tests added, .env file support added with dotenv, README.md file updated for .evn file support, database lost connection bug crash fixed, session server run_session long timeout bug fixed, links module added, webrtc_proc json arguments added, app_proc stdout and stderr support added, infinity app_proc spawn freeze bug fixed
69 lines
1.3 KiB
JavaScript
69 lines
1.3 KiB
JavaScript
var config = require('../config')
|
|
|
|
const not_valid = (message) => {
|
|
console.error('not valid (config.js): ', message)
|
|
}
|
|
|
|
const test_config = () => {
|
|
var config_pass = true
|
|
|
|
if (!config) {
|
|
not_valid('config')
|
|
config_pass = false
|
|
}
|
|
|
|
if (!config.port) {
|
|
not_valid('port')
|
|
config_pass = false
|
|
}
|
|
|
|
if (!config.external_domain) {
|
|
not_valid('external_domain')
|
|
config_pass = false
|
|
}
|
|
|
|
if (!config.coordinator_url) {
|
|
not_valid('coordinator_url')
|
|
config_pass = false
|
|
}
|
|
|
|
if (!config.database_url) {
|
|
not_valid('database_url')
|
|
config_pass = false
|
|
}
|
|
|
|
if (!config.database_name) {
|
|
not_valid('database_name')
|
|
config_pass = false
|
|
}
|
|
|
|
if (!config.webrtc_port_begin) {
|
|
not_valid('webrtc_port_begin')
|
|
config_pass = false
|
|
}
|
|
|
|
if (!config.session_limit) {
|
|
not_valid('session_limit')
|
|
config_pass = false
|
|
}
|
|
|
|
if (!config.log_path) {
|
|
not_valid('log_path')
|
|
config_pass = false
|
|
}
|
|
|
|
if (!config.webrtc_server_path) {
|
|
not_valid('webrtc_server_path')
|
|
config_pass = false
|
|
}
|
|
|
|
if (!config.app_args) {
|
|
not_valid('webrtc_server_path')
|
|
config_pass = false
|
|
}
|
|
return config_pass
|
|
}
|
|
|
|
module.exports = {
|
|
test_config
|
|
} |