You can use either the latest version of Visual Studio or .NET CLI for Windows, Mac and Linux.
- .NET 5.0
- Docker
Before you begin please install .NET 5.0 & Docker on your machine.
This application uses .NET 5 to provide an ordering API.
This repository uses .NET 5, Docker.
It contains the following endpoints:
-
health/live
- Returns the health status of the service.
-
health/ready
- Returns the health status of the service dependacies
The application is broken down into the following project libraries:
- API
- Defines and exposes the available Buying Catalogue Ordering endpoints.
- API.UnitTests
- Contains all of the unit tests for the API project.
- API.IntegrationTests
- Contains all of the integration tests for the API project.
- Ordering.OrderingDatabase
- Defines the artefacts for the Ordering database.
The database project is a SQL Server project, which is only fully supported by Visual Studio on Windows. However, some limited functionality should still be available in other editors.
When making changes to the database make sure to remove the Docker volume as described below before running the application.
From | Host | Port | TLS |
---|---|---|---|
outside the docker network | localhost | 5104 | X |
Navigate to localhost:5104/health/live to view the health status of the service.
To start up the web application, run the following command from the root directory of the repository.
docker-compose up -d --build
This will start the application in a docker container. You can verify that the service has launched correctly by navigating to the following urls via any web browser.
http://localhost:5104//health/live
http://localhost:5104//health/ready
If both URLs return 'Healthy', the environment is configured correctly, and can be accessed via the public endpoints.
If the ready URL returns 'Unhealthy', the associated dependencies of the application may have failed to launch, or cannot be accessed.
To stop the application, run the following command from the root directory of the repository, which will stop the service within the docker container.
docker-compose down -v
Start the application as described in running the application and run the integration tests using your preferred test runner.