Please find below the steps:
- Clone the repository. git clone "https://github.com/suneetk92/Toppr_Backend_Hiring_Challenge.git".
- Open the console/cmd/Terminal and go to the Toppr_Backend_Hiring_Challenge folder and execute "npm install" to install all required packages.
- a. If you want to connect to local mongoDB instance then execute all the queries provided in MongoDB Queries.txt file.
- b. Then change the value of "database" in config.js to point to the local instance.
- Execute "node server.js" in console to start the server.
- Now visit the localhost:1337/list /count /stats to access the GOT API. Or else you can access the api from heroku server(https://toppr-backend.herokuapp.com/).
List - https://toppr-backend.herokuapp.com/list
Count - https://toppr-backend.herokuapp.com/count
Stats - https://toppr-backend.herokuapp.com/stats - Screenshots are added in /Screenshots folder.