first commit

This commit is contained in:
Francois Klieber committed 2021-06-06 20:25:14 +02:00
commit aa7869eb33
386 files changed
+69375

No files matched your search

+20
View File
@@ -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')
}
}