Create a .env file in the root directory of the backend folder and add your tokens there with respect to the config files variables.
ACCESS_TOKEN_SECRET = “some secret”
ACCESS_TOKEN_LIFE = time
REFRESH_TOKEN_SECRET = “some secret”
REFRESH_TOKEN_LIFE = time
SENDGRID_KEY = “”
MONGO_DATABASE = “”
OAuth2Client = “”
STRIPE_SECRET_TOKEN = “”
REDIS_HOST = “”
REDIS_PASSWORD = “”
REDIS_PORT = “”
Note: Make sure the .env files variables matches with that of the config files like the image below.
For Frontend, go to the frontend folder (cd Front-end) and run npm i
To run a development environment, you can use the npm start command. This will start up a development web server on port 3000 for frontend, and a nodemon-watched API server on port 8080.
Note: you have to do npm start for backend and frontend seperately.
Unit testing
You can test the backend, express endpoints using command ( npm test )