better config / install from cli / allow_registration

This commit is contained in:
lesion
2019-06-21 23:52:18 +02:00
parent 4c3c7ee324
commit cf81a73f2f
38 changed files with 530 additions and 272 deletions

12
config/production.js Normal file
View File

@@ -0,0 +1,12 @@
const argv = require('yargs').argv
const path = require('path')
const fs = require('fs')
const config_path = path.resolve(argv.config || '/etc/gancio_config.json')
let config = {}
if (fs.existsSync(config_path)) {
config = require(config_path)
}
module.exports = config