A complete API RESTful for a ToDo List with HTTP Methods.
You need pull this project with Docker, or download this repository in your machine
Method 1: Docker (Recommended)
- You will need Docker installed and configured in your system
- In the terminal:
// Pull the project
docker pull ghcr.io/cauemondek/asp.net-api:latest
// To run the Docker Container
docker run --name dotnet-api-cauemondek -p 8080:8080 -d ghcr.io/cauemondek/asp.net-api:latest
- Now the API is host in port 8080
- (You can type
docker stop dotnet-api-cauemondek
in terminal to shutdown the project)
Method 2: Download Repository
- Download the Reposity Files in Github or use
git clone https://github.com/cauemondek/ASP.NET-API.git
in terminal with GIT installed and configured - You will need .NET SDK 8.0 installed
- In terminal on the project:
// Run the project
dotnet run
// Will appear your PORT
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5227 <- This is your PORT (5227)
- Now the API is host in port mentioned
- (You can use
CTRL + C
in terminal to shutdown the project)
After configured the project (Downloaded Method or Docker Method)
- For acess you will need Insomnia or Postman
- After this you can make a GET, POST, PUT or Delete Requisition with JSON in this url "http://localhost:{Your-PORT}/v1/todos"
- For POST example:
{
"title": "Wash the dishes"
}
- For GET open your browser in: "http://localhost:{Your-PORT}/v1/todos" or make a GET with this URL
- For GET by ID open your browser in: "http://localhost:{Your-PORT}/v1/todos/{The-Task-ID}" or make a GET requisition with this URL
- For PUT send a JSON in: "http://localhost:{Your-PORT}/v1/todos/{The-Id-of-the-Task-you-want-to-change}", example:
{
"title": "Sweep the floor"
}
// Sending to http://localhost:8080/v1/todos/5 for change the ToDo 5
- For DELETE open your browser in: "http://localhost:{Your-PORT}/v1/todos/{The-Id-of-the-Task-you-want-to-delete}" or make a DELETE requisition with this URL
C#
ASP.NET
Docker
SQLite
✨ Feature 1
: HTTP Methods
✨ Feature 2
: Create a ToDo Task
✨ Feature 3
: Edit a ToDo Task
✨ Feature 4
: Search all or a especific ToDo Task for ID
✨ Feature 5
: Delete a ToDo Task