Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/datasektionen/darkmode
8)
https://github.com/datasektionen/darkmode
Last synced: about 2 months ago
JSON representation
8)
- Host: GitHub
- URL: https://github.com/datasektionen/darkmode
- Owner: datasektionen
- License: mit
- Created: 2023-12-14T18:53:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-02T15:50:40.000Z (9 months ago)
- Last Synced: 2024-06-21T04:55:37.187Z (7 months ago)
- Language: Go
- Size: 368 KB
- Stars: 0
- Watchers: 21
- 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`.