Provides a web API for managing recipes. Used as the backend for Recipe Manager.
- .NET 6.0
- ASP.NET Core
- Mediatr
- Entity Framework Core
- SQL Server
- OpenID Connect token authentication
Follow the instructions below to get started with the project in a local development environment.
- .NET 6.0
- SQL Server
- Docker (if running a development instance with Docker)
dotnet build
dotnet run --project RecipeManager.Host
Note you'll need to configure the settings in the host appsettings.Development.json
file as appropriate.
A Docker compose file is provided that can be used to build a development instance of the server, including the web API and a SQL Server instance.
docker-compose build
# Start the web service and a SQL server instance
docker-compose up
A .env
file will need to be created with the following variables defined to be used in the container building process:
- SQL_PASSWORD - the password use for the SQL Server
sa
user - CONNECTION_STRING - the connection string provided to the service (e.g.
User ID=sa;Password=...;Initial Catalog=RecipeManager;Server=...
)
Once the server is running, the database can be created with the create-dev-db.sh
script:
# Creates the database and associated tables
docker exec -i ${container-name} bash < create-dev-db.sh
TODO