Cards Against Humanity website written in Golang.
(WIP) Live on cards.djpiper28.co.uk.
You can run the software via Docker Compose, or build it yourself. You can then go to http://localhost:8000
docker-compose up
- pnpm
- Go
- GNU Make
- Docker
- Docker Compose
To build/test all parts of the system use the below commands.
# Build and execute
make -j
./backend
# or .\backend.exe if you use WinDoze
# Format the code
make fmt -j
# Run the tests
make test -j
# Run the benchmarks
make bench -j
The backend is in Go and uses Gin and Gorilla.
The server will start on http://localhost:8080
, Prometheus metrics can be found at /metrics
(server stats), and
game stats on /game-metrics
. This setup is jank lol, don't question it though. The swagger docs can be found on
http://localhost:8080/swagger/index.html
.
To debug you can use gdb
(of lldb if you are on mac), mac and windows people need to use their debugger I guess.
The frontend is in TS and uses SolidJS, Vite, Vitest, and Storybook. You should use the
Makefile for building make -j
, and pnpm dev
for a dev server.
The server will start on http://localhost:3000
, currently the backend is set to
http://localhost:8080
Due to CORS errors, you need to setup a proxy, see devProxy for a local development proxy server.
Following this you need to run the proxy, backend, and the frontend dev server, then go to the proxies: http://localhost:3255
.