An express,mongoDB, node js api for Querying case studies,its used here to demonstrate the steps host the rest api.
Note
This Rest Api uses Node Express with MongoDB as database to query case studies through a payload
NODE_ENV=development OR production
PORT=8080 OR port of choice
MONGOURI=mongo uri
URL= http://localhost:8080
Note
When adding environment variables in production to heroku the URL should have no port it is the url supplied to you by heroku
//on local
git clone https://github.com/ALWISHARIFF/Getir-Interview.git
cd Getir-Interview
npm install
npm start
Open your local browser and verify the sample-node-api is working by accessing:
http://localhost:8080/
-Documentation
http://localhost:8080/api/casestudy
Post-Api Route
Note
The node_modules
folder will not be transferred.(.gitignore{.env,/node_modules})
cd Getir-Interview
heroku login
heroku create
git push heroku main