https://github.com/datasektionen/darkmode
8)
https://github.com/datasektionen/darkmode
Last synced: 3 months ago
JSON representation
8)
- Host: GitHub
- URL: https://github.com/datasektionen/darkmode
- Owner: datasektionen
- License: mit
- Created: 2023-12-14T18:53:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-13T18:22:04.000Z (4 months ago)
- Last Synced: 2025-02-13T19:28:39.569Z (4 months ago)
- Language: Go
- Size: 372 KB
- Stars: 0
- Watchers: 19
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Darkmode
## API
GET `https://darkmode.datasektionen.se/` - returns the current darkmode status as either `true` or `false` with the `Content-Type` header set to `application/json`.
## Env variables
| Name | Description |
|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `PORT` | The port to listen for connections on |
| `WEBHOOKS` | A list of urls separated by commas. A GET request will be sent to each of these with the header `X-Darkmode-Event: updated` when the darkmode status (might have) changed |
| `LOGIN_FRONTEND_URL` | Origin at which the browser can reach the login system's frontend |
| `LOGIN_API_URL` | Origin at which the backend can reach the login system's api |
| `LOGIN_API_KEY` | API key for login |
| `PLS_URL` | Origin to pls |
| `REDIS_URL` | Where to connect to redis. Example: `redis://:password@hostname:6379` |## Other systems
Darkmode depends on login and pls. The system name in pls is `darkmode` and it checks the permission `switch`.