1.2 KiB
1.2 KiB
dbots
discord botlist.
setup
1. clone and install deps
2. create a .env file
cp .env.example .env
then fill it in (see environment variables below).
3. run migrations
goose -dir internal/db/sql/migrations postgres "$DATABASE_POSTGRES_URL" up
4. start the server
go run .
environment variables
| variable | required | default | description |
|---|---|---|---|
DATABASE_POSTGRES_URL |
yes | — | postgres connection string, e.g. postgres://user:pass@localhost:5432/dbots |
DATABASE_REDIS_URL |
no | — | redis connection string (not used yet) |
DISCORD_CLIENT_ID |
yes | — | your discord application's client id |
DISCORD_CLIENT_SECRET |
yes | — | your discord application's client secret |
DISCORD_REDIRECT_URI |
no | http://localhost:8080/auth/callback |
must match what's set in your discord app's oauth2 redirect urls |
AUTH_PASETO_KEY |
yes | — | 32-byte key as 64 hex chars. generate with openssl rand -hex 32 |
SERVER_PORT |
no | 8080 |
port to listen on |
SERVER_ADDRESS |
no | 127.0.0.1 |
address to bind to |
license
cc0 1.0