config 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
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
var config = require('../config')
|
||||
|
||||
const not_valid = (message) => {
|
||||
console.log('not valid: ', 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.database_url) {
|
||||
not_valid('database_url')
|
||||
config_pass = false
|
||||
}
|
||||
|
||||
if (!config.database_name) {
|
||||
not_valid('database_name')
|
||||
config_pass = false
|
||||
}
|
||||
|
||||
return config_pass
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
test_config
|
||||
}
|
||||
Reference in New Issue
Block a user