This is a simple FastAPI application for managing blog posts. It supports operations like creating, reading, updating, and deleting blog posts.
- Clone the Repository
- Install Dependencies
- Run the Application Locally
- Run the Application in Docker
- Swagger
Clone this repository to your local machine using the following command:
git clone git@github.com:NitheshHS/fast_api_app.gitInstall the required dependencies using the following command:
pip3 install -r requirements.txtTo run the application locally, open your terminal and use the following command. By default, the app will run on port 8000:
uvicorn blogs.main:appTo run the application in Docker, follow these steps:
- Build the Docker image:
docker build -t my-blog-app .- Run the app on a specified host and port:
docker run -d -p 8000:8000 .Once the application is running, you can view the Swagger documentation at the following URL:
http://0.0.0.0:8000/docs