Requirements
- .NET 8.X
- Docker & Docker Compose
Naviagate to the cloned repository and run the following command to install the project dependencies:
dotnet restore
Copy the .env.example
to .env
and enter the credentials.
If you don't want to run postgres locally you can also use the following:
docker-compose --env-file .env run -d --service-ports postgres
(This will use the enviorment variables directly from .env
)
To run the backend you can either run the defined script in the launchSettings.json
via the following command:
dotnet run --launch-profile "http"
Or just run the launch profile in your preferred IDE
Requirements:
- Dotnet Entity Framework
Dotnet Entity Framework can be installed by running:
dotnet tool install --global dotnet-ef
If you changed or added any database relevant files like Data/GitHubUser.cs
you can create a new migration by running:
dotnet ef migrations add ExampleMigrationName
Then you just re-run the dotnet application and it will automatically update the database.