Creating a simple API using Node.js and Express to manage a list of healthcare services.
- Node and npm installed.
- Make sure you have a git account and git installed on your machine.
- Mongodb compass installed on your local machine or any monogdb cluster's account.
- NodeJS
- ExpressJS
- MongoDB
- mongoose
- joi(validation)
-
Clone the repository in your local machine.
git clone https://github.com/Navaneeth-21/Jarurat-Care-Assignment.git -
Install all the dependencies in
package.jsonwith the below command.npm install -
Create a
.envfile which is similar tosample.envand replace thePORTvalue andMONGO_URLwith your valid details. -
Run the application
npm run start -
Then you'll see the output in the console as :
Database connected. Server is running on : http://localhost:PORT -
Testing the all APIS
- Go to the any of the APIS platform like
POSTMANorthunderClientextension in VScode.
- Go to the any of the APIS platform like
-
Run the endpoints acoording to the API documentation
- API DOCUMENTATION Reference
- In the collection you can find the following endpoints :
- Add Services (POST)
- Get Services (GET)
- Update Services (PATCH)
- Delete Service (DELETE)