- Language - Python 3.7
- Framework - Flask Framework
- ORM - SQLAlchemy
- Database - sqlite/postgres
- Web Server - Nginx
- Docker should be installed. (check docker --version)
- docker-compose should be installed. (check docker-compose --version)
- clone this repository into a folder using git clone.
- go inside the folder with docker-compose.yml file.
- Run "docker-compose up"
- Services should be up on port 80 (localhost or public IP, if installing on server)
- Note: docker might sometime gives issue with database volume getting persistent, so i suggest to first install and run this application on a fresh system with no similar docker images running.Otherwise, if you have other docker services running with same name, please change the services name in docker-compose.yml file accordingly.
- GET /api/patients: Gives you all the details of the patients stored in database. Return an empty array if there are no records.
- POST /api/patients: Allows you to post patient details in form of HTTP POST request. Header should contain "content-type:application/json" and it accepts (name,location,streetname,status) parameters.
- DELETE /api/patients/id: Allows you to delete patient record that matches the id.
- PUT /api/patients/id: Allows you to update patient record that matched the id.
- GET /api/patients/id: Allows you to query single patient record from the database.