-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b92e07
commit 3433772
Showing
4 changed files
with
69 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
// read .env file into proces.env | ||
require('dotenv').config() | ||
require("dotenv").config() | ||
|
||
const envalid = require('envalid') | ||
var pjson = require('../package.json'); | ||
const envalid = require("envalid") | ||
var pjson = require("../package.json") | ||
|
||
module.exports = envalid.cleanEnv(process.env, { | ||
BACKTEST_TEST_PAIR: envalid.str({default: 'BTCUSDT'}), | ||
BACKTEST_TEST_PAIR: envalid.str({ default: "BTCUSDT" }), | ||
BINANCE_API_KEY: envalid.str(), | ||
BINANCE_SECRET_KEY: envalid.str(), | ||
BVA_API_KEY: envalid.str(), | ||
CONNECT_SERVER_TO_BVA: envalid.bool({ default: true }), | ||
DATABASE_CONNECT_VIA_SSL: envalid.bool({ default: false }), | ||
DATABASE_INSERT_PAIR_HISTORY: envalid.bool({ default: true}), | ||
DATABASE_URL: envalid.str({default: 'DATABASE_URL=postgres://postgres:[email protected]:5432/postgres'}), | ||
HOST: envalid.host({ default: 'localhost' }), | ||
SERVER_PORT: envalid.port({ default: 4000, desc: 'The port to start the server on' }), | ||
TRADER_PORT: envalid.port({ default: 8003, desc: 'The port to trader webserver runs' }), | ||
STRATEGY_TIMEFRAME: envalid.str({default:'15m'}), | ||
DATABASE_INSERT_PAIR_HISTORY: envalid.bool({ default: true }), | ||
DATABASE_URL: envalid.str({ | ||
default: | ||
"DATABASE_URL=postgres://postgres:[email protected]:5432/postgres", | ||
}), | ||
HOST: envalid.host({ default: "localhost" }), | ||
SERVER_PORT: envalid.port({ | ||
default: 4000, | ||
desc: "The port to start the server on", | ||
}), | ||
TRADER_PORT: envalid.port({ | ||
default: 8003, | ||
desc: "The port to trader webserver runs", | ||
}), | ||
STRATEGY_TIMEFRAME: envalid.str({ default: "15m" }), | ||
VERSION: envalid.str({ default: pjson.version }), | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters