env variables handling

This commit is contained in:
cpu
2025-03-31 01:26:50 +02:00
parent c2e7bd5f1e
commit 51a1be22d2
15 changed files with 209 additions and 106 deletions

View File

@@ -27,7 +27,7 @@ game-timer/
## Environment Variables
The application uses environment variables for configuration. These are loaded from a `.env` file at runtime.
The application uses environment variables for configuration. These are loaded from a `.env` file and converted to a `config.env.js` file that is served by the web server.
### Setting Up Environment Variables
@@ -45,7 +45,12 @@ The application uses environment variables for configuration. These are loaded f
BACKEND_URL=https://your-push-server.example.com
```
3. For security, never commit your `.env` file to version control. It's already included in `.gitignore`.
3. Generate the `config.env.js` file using the provided script:
```bash
./generate-config.sh
```
4. For security, never commit your `.env` file to version control. It's already included in `.gitignore`.
### Generating VAPID Keys