Skip to content

Setting up your Development Environment

Requirements

More useful tools

  • It can be useful to be able to take a peek at the SQLite database.
  • SpcsGPT can help explain more on a subject, or help out with implementation tips
  • GitHub Copilot

Getting started

Pasted image 20231117023718
Step 1: Clone the Repository To begin, clone the desired repository to your local machine. The repository is located at https://github.com/CacheCows/CowPress

Pasted image 20231117023902
Step2: Go to the CowPress folder in your shell. Open up your unix shell, cmd.exe, powershell or similar and cdto the CowPresssub-directory in the repository (the one that contains the .csproj file among other things).

Step 3: Database Setup with EF Core Now, focus on initialising your database using Entity Framework (EF) Core.

Pasted image 20231117024005

  1. EF Core Installation: If not already installed, you’ll need to install the EF Core tooling. This can be done via the .NET CLI (Command Line Interface) using the command: dotnet tool install --global dotnet-ef, and you might need to specify version here, e.g. dotnet tool install --global dotnet-ef --version 8.0.0. This tool simplifies database operations like migrations and updates.

  2. Updating the Database: Execute dotnet ef database update to apply the latest migrations to your database. This command updates the database schema to match the current state of your models.

Step 4: Launch the Application
Option 1: Start using your Visual Studio. To avoid certificate errors you can use http as per the image, or you can set up the local dev certs if you want.
Pasted image 20231116160047
Option 2: to start sing CLI, use dotnet watch run to start the application. This command also enables hot reloading, automatically applying changes to the running application without needing a manual restart.

You should now be able to look at the website on http://localhost:5207

Now lets take a look at Using Cowpress


Last update : November 20, 2023
Created : November 16, 2023