- node 14.x
On project root folder:
$npm install
- NodeJS - Express - SocketIO - MongoDB
- To start the server and get prices data for a specific interval from https://api.avax-test.network/ext/bc/C/rpc
- cd backend
- node index.js
- In the project root folder, create '.env' file with the following content. The file is excluded from the GH repo.
MONGODB_URI=mongodb+srv://binarycatUser:[email protected]/myFirstDatabase?retryWrites=true&w=majority
CURRENCY_FEED_URL=https://api.avax-test.network/ext/bc/C/rpc
CURRENCY_FEED_CONTRACT_ADDRESS=0x86d67c3D38D2bCeE722E601025C25a575021c6EA
CURRENCY_FEED_INTERVAL=30000
UPDATE_DB=off
-
Make sure to 'npm install' both in the project root and webapp folders
-
No need to deploy contracts or running local blockchain server. The local app is connecting to the test net. Just make sure you have MetaMask Binance Network and Account configured.
-
Start local node.js server by running 'npm run start_local' in the project root folder
-
Start webapp server by running 'webapp/yarn start'