{
"TransactionApi": "http://127.0.0.1:3000", // url from scanner api
"BinanceApi": "api.binance.com", // binance api url
"Firebase": {
"ProjectId": "" // project id from firebase account
},
"SMSService": {
"FromNumber": "", // sender twilio number
"AccountSid": "", // account sid from twilio account
"AuthToken": "" // aith token from twilio account
},
"DBConnectionString": { // mongodb connection string
"Secret": "", // secret for jwt token generator
"SMTP": { // smtp server config
"Host": "",
"Password": "", // smtp server password
"From": {
"Name": "", // Sender name
"Address": "" // Sender email
}
}
}
-
Setup firebase/postgres/twilio/smtp
-
Copy firebase private key json to root project directory. This file must have name firebase.json. (more info)
-
Setup config.release.json (example in config.json)
- Build
make build
- Run api
./bin/api --host 0.0.0.0:9544 --config config.release.json
flags:
config - config file path
host - host for listen fractapp server
- Run subscriber
./bin/subscriber --host 0.0.0.0:3005 --config config.release.json
flags:
config - config file path
host - host for listen fractapp server
- Run scheduler
./bin/scheduler --config config.release.json
flags:
config - config file path
- Run price saver for DOT
./bin/price --config config.release.json --currency DOT --start 1597622400000
flags:
config - config file path
currency - DOT/KSM
start - timestamp for start scan price
- Run price saver for KSM
./bin/price --config config.release.json --currency KSM --start 1599177600000
flags:
config - config file path
currency - DOT/KSM
start - timestamp for start scan price
Config for docker is in config-docker.json
- Setup firebase/postgres/twilio/smtp
- Copy firebase private key json to root project directory. This file must have name firebase.json. (more info)
- Run docker-compose
docker-compose up
Swagger is available at {host}/swagger/index.html
Build
make build
Update all mocks in project for tests. (You need to have installed mockgen)
make updateMocks
Start tests and get total coverage info
make totalCoverage
Start tests and get coverage in html format
make htmlCoverage