put storage backend to the config

This commit is contained in:
oleg 2015-07-12 15:14:28 +03:00
parent c4031a4563
commit 25d3f48b5a
2 changed files with 10 additions and 6 deletions

5
app.js
View File

@ -57,6 +57,7 @@ Steppy(
app.config.paths.data = path.join(process.cwd(), 'data');
app.config.paths.projects = path.join(app.config.paths.data, 'projects');
app.config.paths.builds = path.join(app.config.paths.data, 'builds');
app.config.paths.db = path.join(app.config.paths.data, 'db');
app.config.paths.preload = path.join(app.config.paths.data, 'preload.json');
var buildDirExistsCallback = this.slot();
@ -92,8 +93,8 @@ Steppy(
logger.log('Server config:', JSON.stringify(app.config, null, 4));
db.init('path/to/db/ignored/for/memdown', {
db: require('memdown'),
db.init(app.config.paths.db, {
db: require(app.config.storage.backend),
valueEncoding: 'json'
}, this.slot());
},

View File

@ -6,6 +6,13 @@ nodes:
- type: local
maxExecutorsCount: 2
http:
host: 127.0.0.1
port: 3000
storage:
backend: 'memdown'
notify:
mail:
host: smtp.gmail.com
@ -13,7 +20,3 @@ notify:
auth:
user: bot.nci@gmail.com
pass: pass
http:
host: 127.0.0.1
port: 3000