smotsing the gifs
| backend | ||
| frontend | ||
| .env | ||
| .env.example | ||
| docker-compose.yml | ||
| README.md | ||
Smots Gif Gaming
i'm not very good at writing readmes
Quick start
cp .env.example .env
docker compose up --build
The site is then at http://localhost:3000.
Discord OAuth setup
- Create an app at https://discord.com/developers/applications
- Add a redirect URI:
http://localhost:3000/auth/discord/callback(must matchDISCORD_REDIRECT_URIin.envexactly) - Copy the Client ID / Client Secret into
.env
Making yourself a moderator
I kinda forgot to add an option to make a user a moderator so uuuuh this is how you do it
docker compose exec postgres psql -U usernamein.env -d databasein.env \
-c "UPDATE users SET is_moderator = TRUE WHERE discord_id = 'DISCORD_ID';"
Public API
Any logged-in user can self-issue a key from /apikeys.html
(POST /api/apikeys) the raw key is shown once, pass it as X-API-Key to:
GET /api/v1/search?q=&tag=&sort=date|popularity|score&page=GET /api/v1/gifs/:id
Both return each gif's direct S3 URL.