better config / install from cli / allow_registration
This commit is contained in:
19
config/default.json
Normal file
19
config/default.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"title": "Gancio",
|
||||
"description": "A shared agenda for local communities",
|
||||
"baseurl": "http://localhost:3000",
|
||||
"server": {
|
||||
"host": "localhost",
|
||||
"port": 3000
|
||||
},
|
||||
"db": {
|
||||
"dialect": "sqlite",
|
||||
"storage": "./db.sqlite"
|
||||
},
|
||||
"upload_path": "./",
|
||||
"admin": {
|
||||
"email": "les",
|
||||
"password": "les"
|
||||
},
|
||||
"secret": "za34yz70mmwlervesgxor"
|
||||
}
|
||||
12
config/production.js
Normal file
12
config/production.js
Normal 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
|
||||
Reference in New Issue
Block a user