- Requirements:
- MongoDB Installed
- Nodejs Installed
Easily Clone the project and Read, or customize for your projects :).
-
First do a
npm iTo Install dependencies. -
Start the Project With command
npm start -
then go to requests folder placed in http folder at app, and send a request to
http://localhost:8000/auth/registerand fill the data there with your own Ideas. And your account will be automatically registered. tip: You have to install rest Client extension so that you can use this kind of files. -
Add a
.envFile to the root of your application with the following options:
JWT_SECRET_KEY={your Key => can be anything}- then make a request to
http://localhost:8000/auth/loginand put your username and password given in the register part. Go to mongo Db and Copy your token.
then update .env file in the following way:
JWT_SECRET_KEY=YourKeyHere
token='Bearer CopiedToken'tip: Your token is valid for 30 days, and after that you have to login again and copy the new token and replace it in the .env file.
Hope you Enjoy!