first commit
This commit is contained in:
commit
aa7869eb33
386 files changed
+69375
No files matched your search
@@ -0,0 +1,20 @@
|
||||
const _ = require('lodash');
|
||||
const fs = require('co-fs');
|
||||
|
||||
const parts = {
|
||||
paperTrader: 'config/plugins/paperTrader',
|
||||
candleWriter: 'config/plugins/candleWriter',
|
||||
performanceAnalyzer: 'config/plugins/performanceAnalyzer'
|
||||
}
|
||||
|
||||
const gekkoRoot = __dirname + '/../../';
|
||||
|
||||
module.exports = function *() {
|
||||
if(!_.has(parts, this.params.part))
|
||||
return this.body = 'error :(';
|
||||
|
||||
const fileName = gekkoRoot + '/' + parts[this.params.part] + '.toml';
|
||||
this.body = {
|
||||
part: yield fs.readFile(fileName, 'utf8')
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user