You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wilson Jusuf edited this page Mar 6, 2021
·
3 revisions
Here are the steps to run the backend locally.
First, npm install all the required backend dependencies
cd server;
npm install
Then, install postgresql 12.4 on your local machine. For mac, you can use this.
Get a finnhub.io API key - We use this for market data.
export FINNHUB_API_KEY="YOUR_API_KEY_HERE"
Then, run the backend locally by doing:
PG_CONNSTR='postgresql://DBUSER_HERE:PASSWORD_HERE@localhost:5432/DATABASE_NAME_HERE' FINNHUB_API_KEY=$FINNHUB_API_KEY npm run dev-server
In windows systems, setting environment variables like the above won't work since e.g. it will interpret PG_CONNSTR as the actual command. You need to set PG_CONNSTR as the environment variable separately in the shell, and run npm run-dev-server after it.