Update README and index
This commit is contained in:
@@ -15,6 +15,7 @@ This API is quite simple to self-host.
|
|||||||
Env variables:
|
Env variables:
|
||||||
|
|
||||||
- `NYEKI_DEBUG`: Whether to start in debug mode.
|
- `NYEKI_DEBUG`: Whether to start in debug mode.
|
||||||
|
- `NYEKI_REDIS_URL`: The Redis URL to use for caching.
|
||||||
- `NYEKI_GITHUB_TOKEN`: A PAT token. You can get one
|
- `NYEKI_GITHUB_TOKEN`: A PAT token. You can get one
|
||||||
[here](https://github.com/settings/tokens).
|
[here](https://github.com/settings/tokens).
|
||||||
- `NYEKI_DISCORD_TOKEN`: A bot token. You can get one
|
- `NYEKI_DISCORD_TOKEN`: A bot token. You can get one
|
||||||
@@ -23,7 +24,6 @@ Env variables:
|
|||||||
- `NYEKI_BIND_PORT`: Docker-only. The port to bind the API to. Defaults to `8000`.
|
- `NYEKI_BIND_PORT`: Docker-only. The port to bind the API to. Defaults to `8000`.
|
||||||
- `NYEKI_WORKERS`: Docker-only. The amount of async web workers to spawn. Defaults to
|
- `NYEKI_WORKERS`: Docker-only. The amount of async web workers to spawn. Defaults to
|
||||||
`$(nproc)` (the amount of CPU cores).
|
`$(nproc)` (the amount of CPU cores).
|
||||||
- `NYEKI_REDIS_URL`: The Redis URL to use for caching.
|
|
||||||
|
|
||||||
You can run it using uv by doing:
|
You can run it using uv by doing:
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,24 @@ app = FastAPI(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/")
|
||||||
|
def index():
|
||||||
|
return {
|
||||||
|
"title": "Nyeki's API",
|
||||||
|
"message": "Welcome to Nyeki's API! Refer to each version's documentation for more information.",
|
||||||
|
"versions": {
|
||||||
|
"v1": {
|
||||||
|
"base": "https://api.nyeki.dev/v1",
|
||||||
|
"docs": "https://api.nyeki.dev/v1/docs",
|
||||||
|
},
|
||||||
|
"v2": {
|
||||||
|
"base": "https://api.nyeki.dev/v2",
|
||||||
|
"docs": "https://api.nyeki.dev/v2/docs",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
app.add_exception_handler(404, NotFoundError.handler)
|
app.add_exception_handler(404, NotFoundError.handler)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user