This is a test project to use while learning docker, Kubernetes, docker-compose.
It is pretty simple, it has two end-point one is info that supports only the GET function and returns API information. Other Bill end-point it has GET, POST, PUT and Delete end-points.
The project contains, Serilog file logging with CompactJsonFormatter. Datadog Tracker for trace requests in DataDog. Swagger for API documentation, and testing purposes.
It is developed with Clean Architecture approach and .NET 5
It uses MediatR, AutoMapper, EntityFrameworkCore with Postgresql.
- How to Create Small and Secure Docker Container for .Net Applications
- How to Create Docker Compose File
Clone the project
git clone https://github.com/nadirakdag/bill-tracker
Go to the project directory
cd bill-tracker
Install dependencies
dotnet restore
Install Postgresql
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres
Start the server
dotnet run --project src/API/API.csproj
To run tests, run the following command
dotnet test BillTracker.sln
GET /api/info
GET /api/bill
GET /api/bill/{id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of item to fetch |
POST /api/bill
Body | Type | Description | Location |
---|---|---|---|
Bill Object |
Json |
Required. Bill information to create | Body |
PUT /api/bill/{id}
Parameter | Type | Description | Location |
---|---|---|---|
id |
string |
Required. Id of item to update | QueryString |
Bill Object |
Json |
Required. Bill information to create | Body |
DELETE /api/bill/{id}
Parameter | Type | Description | Location |
---|---|---|---|
id |
string |
Required. Id of item to delete | QueryString |