This project is a very simple e-commerce website for sports products.
These steps assume that you have a SQL Server instance running on your machine. If not, you can use the SQL Server Docker image to run one. Make sure to set the correct connection string of the SQL Server instance in
src/Server/appsettings.Development.json
.
- Clone the repository
- Restore the packages:
dotnet restore src/Server/Server.csproj
- Start the server:
dotnet run watch --project src/Server/Server.csproj
- Clone the repository
- Restore the packages:
dotnet restore src/Server/Server.csproj
- Build the server:
dotnet build src/Server/Server.csproj
- Publish the server:
dotnet publish src/Server/Server.csproj -c Release -o publish
- Make sure the following environment variables are set:
DOTNET_ENVIRONMENT
: environment name, e.g.Production
DOTNET_ConnectionStrings__SqlDatabase
: connection string to the SQL Server database
- Start the server:
dotnet publish/Server.dll
No database is required to run the unit tests.
- Clone the repository
- Restore the packages:
dotnet restore src/Server/Server.csproj
anddotnet restore tests/Domain.Tests/Domain.Tests.csproj
- Run the unit tests for the domain:
dotnet test tests/Domain.Tests/Domain.Tests.csproj