How to setup a local development environment for GIRAF (Windows 10)¶
Installing MySQL¶
If any of the downloads fail, just click "Try Again"
Starting the MySQL server¶
- Start the MySQL80 service
"Tjenester" = "Services" in English
Configuring Weekplanner and Web-API repositories to work locally¶
- Go to weekplanner/lib/main.dart
- Change
'assets/environments.dev.json'
to'assets/environments.local.json'
on line 29 - Go to web-api/GirafRest/appsettings.Development.json
- Change the server variable to
server=localhost
in theDefaultConnection
key
Building the database for the Web-API and running it with sample data¶
- Open command prompt in web-api/GirafRest
- Type
dotnet-ef database update
- Type
dotnet run --sample-data
Making sure everything works¶
- Run the weekplanner application on your emulator
-
Login using the default credentials
-
Username:
guardian-dev
- Password:
password
If you successfully log in and see output in the Web-API console window, then you are successfully running everything locally
Updating the database when changes are made to the Web-API without migrations¶
Method 1¶
- Open command prompt in web-api/GirafRest
- Type
dotnet-ef database drop
- Rebuild the database
Method 2¶
- Drop the
giraf
database in the MySQL server
Last update: December 12, 2023