This app uses the Battle.net OAuth flow to get World of Warcraft token prices and show the current and historical prices.
- Go to battle.net guide to create a client first
- Prepare a mongodb service url
- Put above information in the
.env
file in server folder, likealso create aMONGODB_URI=<Your mongodb service url> BNET_ID=<Your battle.net client id> BNET_SECRET=<Your battle.net client secert> PORT=3002 NODE_ENV=production
.env.local
file at the same folder, the content is same as.env
, but setNODE_ENV=development
- Node version >= 16
- run
yarn server-dev
, then server should be running on port 3002 - run
yarn client-dev
, client should be running onlocalhost:3000
- run
yarn client-prod
to build client, may need toset NODE_OPTIONS=--openssl-legacy-provider
- run
yarn server-prod
to start server, the app should be running onlocalhost:3002
You can schedule a job to get the token prices, recommend hourly job. For details, refer to scripts/getToken_task.sh