Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adityasinghvats/fastapi-backend
A backend project using Fast Api , MongoDB , Docker , Postman.
https://github.com/adityasinghvats/fastapi-backend
backend-api crud-application docker dockerfile fastapi mongodb python3 uvicorn
Last synced: about 23 hours ago
JSON representation
A backend project using Fast Api , MongoDB , Docker , Postman.
- Host: GitHub
- URL: https://github.com/adityasinghvats/fastapi-backend
- Owner: Adityasinghvats
- Created: 2024-08-27T12:32:04.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-28T04:51:44.000Z (5 months ago)
- Last Synced: 2024-11-14T07:28:15.474Z (2 months ago)
- Topics: backend-api, crud-application, docker, dockerfile, fastapi, mongodb, python3, uvicorn
- Language: Python
- Homepage:
- Size: 10 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FastApi-Backend
## To setup the project locally on your machine
- Get started in a code editor (Preferably Pycharm)
---
- `git clone https://github.com/Adityasinghvats/FastApi-Backend.git`
---
- Need to setup MongoDB on local system.
- In the root directory
---
- Open integrated terminal and run the command
- `pip install -r requirements.txt`
---
- Run `script.py` to parse the data to MongoDB.
- Now run the project locally
---
- `cd app`
- `uvicorn main:app --reload`
---
- To get api docs in Swagger format
- Open the url provided by uvicron in terminal directly
---
- `http://127.0.0.1:8000/docs`
- `http://127.0.0.1:8000/redoc`
---
- Install Docker Desktop , then run the following command in root directory---
- `docker build -t my_python_app .`
- `docker run -d --name fast_api -p 80:80 my_python_app`
---
![Screenshot 2024-08-27 182929](https://github.com/user-attachments/assets/c4c66d22-4fa6-4a1f-9d52-490d830b4bb0)