This is the code for the backend part of the application.
- Fork this project and clone it in your local machine
- In the terminal type
npm i
. This will install all the necessary packages. (You should have Nodejs installed in your local machine) - Create an .env file in the root of your project and add the following lines
PORT=4000
MONGOURI= (PUT YOUR MONGODB DATABASE URL)
JWT_SECRET_KEY= (PUT YOUR JWT SECRET KEY HERE)
- Your backend now has been setup. You can run it by typing
npm dev
. Now your backend server will run onport 4000
and you have simultaneously run the frontend part as well which will run onport 3000
.
- You need to have a mongodb database setup locally
- You need to generate a JWT secret key which can be a series of random numbers and alphabets or mix of both. You can easily find a key generator on the internet.
- If you have not setup the frontend part yet. Here is the link