This repository contains a FastAPI Todo application with a Dockerized environment. The app allows users to manage their todo lists efficiently.
- Create, Read, Update, and Delete (CRUD) operations for todos.
- Dockerized environment for easy deployment.
- Utilizes Neon Database on the cloud for data storage.
To run this application locally, follow these steps:
-
Clone this repository to your local machine.
git clone <repository_url>
-
Navigate to the project directory.
cd fastapi-todo-app
-
Update the
DATABASE_URL
environment variable in thecompose.yml
file with your Neon Database connection string. -
Run the Docker container using Docker Compose.
docker-compose up -d
-
Access the application in your web browser at
http://localhost:8000
.
- Create a new todo: Send a POST request to
/todos
with JSON payload containing todo details. - Get all todos: Send a GET request to
/todos
. - Get a specific todo: Send a GET request to
/todos/{id}
with the todo ID. - Update a todo: Send a PUT request to
/todos/{id}
with JSON payload containing updated todo details. - Delete a todo: Send a DELETE request to
/todos/{id}
with the todo ID.
Contributions are welcome! Please feel free to fork this repository and submit pull requests to contribute new features, improvements, or bug fixes.
This project is licensed under the MIT License.
Note: Replace <repository_url>
with the actual URL of your repository.