config tests added,
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
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
const fs = require('fs')
|
||||
|
||||
const titles = require('../titles')
|
||||
|
||||
const path_not_exists = (message) => {
|
||||
console.error('path not exists (titles.json): \n', message)
|
||||
}
|
||||
|
||||
const test_titles = () => {
|
||||
var titles_pass = true
|
||||
|
||||
titles.forEach(title => {
|
||||
if (!fs.existsSync(title.path)) {
|
||||
titles_pass = false
|
||||
path_not_exists(`\ttitle: ${title.title}, path: ${title.path}`)
|
||||
}
|
||||
})
|
||||
|
||||
return titles_pass
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
test_titles
|
||||
}
|
||||
Reference in New Issue
Block a user