This repository has been archived on 2025-10-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2021-06-06 20:25:14 +02:00

20 lines
518 B
JavaScript

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')
}
}