MedPlus is an Express.js application designed for managing pharmacies and medicines. It provides a set of RESTful APIs for CRUD operations on pharmacies and medicines, user management, and image uploads through Cloudinary. The API is documented with Swagger for easy exploration and testing.
MedPlus API provides endpoints for managing pharmacies and medicines. It includes functionality for creating, reading, updating, and deleting pharmacy and medicine records. The API also supports user authentication and image uploads through Cloudinary. The API documentation is available via Swagger UI.
To run this application locally, you will need:
- Node.js (v14 or higher)
- npm or yarn
- MongoDB (You can use MongoDB Atlas for cloud-based MongoDB)
- Cloudinary account
Clone the repository to your local machine using the following command:
git clone https://github.com/tajbaba999/assgiment.git
cd assgiment
Navigate to the project directory and install the required dependencies:
npm install
# or
yarn install
Create a .env file in the root directory of the project with the following contents:
PORT=3000
MONGODB_URI=<your_mongodb_connection_string>
CLOUDINARY_CLOUD_NAME=<your_cloudinary_cloud_name>
CLOUDINARY_API_KEY=<your_cloudinary_api_key>
REDIS_URL=<url>
Start the application using the following command:
npm start
# or
npm run dev
The application will be available at http://localhost:3000.
Head over to http://localhost:3000/api-docs to view the API documentation generated by Swagger.
The best way to test the API endpoints is to import the Medlr.postman_collection.json file into Postman. You can download the file from the following link: