Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
/ bat-ratios Public archive

a server to cache and serve up exchange rates between currencies

Notifications You must be signed in to change notification settings

brave-intl/bat-ratios

Repository files navigation

bat-ratios

Server for ratios between fiats and alts

setup

git pull [email protected]:brave-intl/bat-ratios.git
yarn install

start

yarn start

test

Might need to use specific node version nvm use 14.17.0

yarn test

development

before anything else you must do the following steps

yarn run docker-build # build the containers
yarn run docker-up-dbs # bring the dbs up
yarn run docker-migrate-dbs # migrate the dbs
yarn run docker-fill-dbs # fill the dbs with data
# optionally
yarn run docker-up # brings server up
yarn run dev

to access the documentation visit /v1/documentation/

Postgres

After running

yarn run docker-migrate-up

login to the db with

psql postgres://ratios:password@localhost:5010/ratios

curling

curl -X GET \
  -H "Authorization: Bearer $(kubectl --context bsg-sandbox \
    -n ratios-staging \
    get secrets/env -o json | \
    jq -r '.data.TOKEN_LIST' | \
    base64 -d | \
    jq -j -R 'split(",")|.[0]'
  )" \
  https://ratios.bsg.bravesoftware.com/v1/history/single/fiat/EUR/2020-11-01

About

a server to cache and serve up exchange rates between currencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages