This is the backend of a Pharmacy Management System built with the MERN stack. It is dockerized and deployed using GitHub Actions.
You can pull the Docker image for this backend using the following command:
docker pull chathuratd007/pms_back:latestTo run the Docker container, use the following command:
docker run -d -p 4000:4000 \
-e "MONGO_URI=<your-database-connection-string>" \
-e "SECRET=<your-jwt-secret>" \
-e "PORT=4000" \
--name pms_back \
chathuratd007/pms_back:latestThe backend exposes the following main routes:
/api/user: Handles user-related operations./api/prescription: Manages prescriptions./api/reorder: Handles reorder operations./api/expired: Manages expired medications./api/abtexpired: Handles ABT expired medications./api/outofstock: Manages out-of-stock medications./api/abtoutofstock: Handles ABT out-of-stock medications./api/drugouts: Manages drug outs./api/medicinenames: Handles medicine names./api/billing: Manages billing operations./api/staffReward: Handles staff reward operations./api/leaves: Manages leave operations./api/leaderboard: Handles leaderboard operations./api/salesreport: Manages sales reports./api/allPres: Handles all prescriptions./api/email: Manages email operations.
The backend is currently hosted at http://34.228.79.166:4000/
To run the backend locally, follow these steps:
-
Clone the repository:
git clone https://github.com/chathuratd/PMS_backend.git cd PMS_backend -
Install dependencies:
npm install
-
Create a
.envfile with the necessary environment variables:MONGO_URI=<your-database-connection-string> SECRET=<your-jwt-secret> PORT=4000
-
Start the server:
npm start
The server will start on http://localhost:4000.
The workflow file for continuous integration and deployment can be found in the repository's GitHub Actions tab.