Add environment variables

This commit is contained in:
Reimar 2024-08-21 08:58:42 +02:00
parent a082441826
commit c9769fcada
Signed by: Reimar
GPG Key ID: 93549FA07F0AE268
6 changed files with 34 additions and 16 deletions

2
Mobile/.gitignore vendored
View File

@ -41,3 +41,5 @@ app.*.map.json
/android/app/debug /android/app/debug
/android/app/profile /android/app/profile
/android/app/release /android/app/release
environment.json

View File

@ -0,0 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="main.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="additionalArgs" value="--dart-define-from-file environment.json" />
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
<method v="2" />
</configuration>
</component>

15
Mobile/.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"request": "launch",
"type": "dart",
"program": "lib/main.dart",
"args": [
"--dart-define-from-file",
"environment.json"
]
}
]
}

6
Mobile/README.md Normal file
View File

@ -0,0 +1,6 @@
# SkanTravels frontend
### Running
- Copy `environment.example.json` to `environment.json` and fill out the values
- Run `flutter run --dart-define-from-file environment.json`

View File

@ -0,0 +1,4 @@
{
"AUTH_SERVICE_HOST": "http://localhost:5287",
"APP_SERVICE_HOST": "http://localhost:8080"
}

View File

@ -1,16 +0,0 @@
# mobile
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.