A simple Node.js and Express-based API for managing healthcare services. This API allows you to add, update, delete, and retrieve healthcare services from a MongoDB database. The project includes full CRUD operations for service management.
- Add a Service: Allows users to add a healthcare service by providing the name, description, and price.
- Get All Services: Retrieve a list of all available healthcare services.
- Update a Service: Modify the details of an existing service.
- Delete a Service: Remove a service from the database.
- Validation: Ensures all required fields (name, description, and price) are properly validated before storing.
- Node.js: JavaScript runtime for backend development.
- Express.js: Fast and lightweight web framework for Node.js.
- MongoDB: NoSQL database for storing services.
- Mongoose: ODM library for MongoDB and Node.js.
- dotenv: For environment variable management.
- cors: Middleware for handling Cross-Origin Resource Sharing.
- body-parser: Middleware for parsing incoming request bodies.
Before you begin, ensure you have the following installed:
- Node.js v14+
- MongoDB
- A package manager like npm or yarn.
git clone https://github.com/Araviind07/HealthcareService.git
cd HealthcareService
npm install
MONGO_URI=your-mongo-db-connection-string
npm start
The server should now be running on http://localhost:{PORT}
- Clone the Repository: Clone the GitHub repository to your local machine.
- Install Dependencies: Run npm install to install all the required packages.
- Configure MongoDB: Set up a MongoDB database (locally or through MongoDB Atlas) and add the connection string to your .env file.
- Start the Server: Run npm start to spin up the backend server.
- Test API: Use tools like Postman or cURL to test the various API endpoints (create, read, update, delete services).
- Deploy: You can deploy this project on platforms like Heroku, Vercel, or any cloud service supporting Node.js apps.
- Authentication for different user roles.
- Search and filter services.
- Frontend integration with React.js or another framework.
This project is licensed under the MIT License.