I need to initialize from ~/myConfig.json
, which looks like:
{
"databaseActive": "production",
"databases": [
{
"name": "localhost",
"PGDB": "asdf",
"PGHOST": "localhost",
"PGPASSWORD": "asdf",
"PGPORT": "5432",
"PGUSER": "asdf"
},
{
"name": "production",
"PGDB": "asdf",
"PGHOST": "asdf.rds.amazonaws.com",
"PGPASSWORD": "asdf",
"PGPORT": "5432",
"PGUSER": "asdf"
}
]
}
This means I cannot call scalikejdbc.config.DBs.setupAll()
. How might I use this JSON file to initialize scalikeJDBC from the appropriate database settings, according to the value of databaseActive
?