Setting up your Development Environment
Requirements¶
- An editor or IDE (e.g VS Code, Visual Studio or Rider)
- .NET 8 (download from here), (Linux setup instructions)
More useful tools¶
- It can be useful to be able to take a peek at the SQLite database.
- For VSCode there’s an extension to work with SQLite databases.
- SQLiteStudio enables you to view/edit the database. Jetbrains IDEs should also be able to connect to it.
- SpcsGPT can help explain more on a subject, or help out with implementation tips
- GitHub Copilot
Getting started¶
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
Step2: Go to the CowPress folder in your shell. Open up your unix shell, cmd.exe, powershell or similar and cd
to the CowPress
sub-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.
-
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. -
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.
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
Created : November 16, 2023