https://github.com/hrkings/todoapi
https://github.com/hrkings/todoapi
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hrkings/todoapi
- Owner: HRKings
- Created: 2021-03-10T19:31:55.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-15T06:41:58.000Z (over 3 years ago)
- Last Synced: 2024-12-27T13:23:14.018Z (5 months ago)
- Language: C#
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TODO API
This repository contains a simple TODO API made using ASP.NET Core 5/.NET 5 and PostgreSQL.
## Running
Docker files and docker compose are provided. You should only need to run `docker-compose up -d` inside the root of the repository and a docker stack will be launched with a PostgreSQL database and an auto refreshing ASP.NET API with a swagger index. Everything is running under `https://localhost/7000`. The EF migrations are automatically ran when you start the docker stack.
### Auth
To use the API, auth is required. You can login via the debug auth endpoint. The email is `[email protected]` and the password `123`.
### Changing ORMs
Two ORMs are provided (Dapper and Entity Framework Core), by default EF is used. To change, just go to the docker compose file and change the ORM environment variable to "Dapper" and rebuild the container. It should be using Dapper then.
## Swagger
The entire project is documented via swagger, if you are running a dev environment, you can access the editor on `http://localhost:7000/swagger/index.html`. The swagger.json spec is also on the root of this repository.
## Tests
Provided that you are running the project with EF, unit tests are provided for each endpoint.