This is the repository behind https://code.golf
- Install dependencies:
- Install the local CA:
$ make cert
Using the local CA at "~/.local/share/mkcert" ✨
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in the Firefox and/or Chrome/Chromium trust store (requires browser restart)! 🦊
Created a new certificate valid for the following names 📜
- "localhost"
The certificate is at "./localhost.pem" and the key at "./localhost-key.pem" ✅
- Install the NPM packages:
$ npm install
- Bring up the website:
$ make dev
- Optionally, load information from the code.golf database.
go run utils/update_sql_from_api.go
- Navigate to https://localhost
Some of ancillary scripts are written in Raku, to run these ensure you have a recent install of Raku installed and use Zef to install the dependencies:
$ zef install --deps-only .
- Run the unit tests:
$ make test
- Run the e2e tests:
$ make e2e
URL slugs are consistently abbreviated (e.g. cheeovs, langs, stats) but page titles aren't (e.g. Achievements, Languages, Statistics).
Paginated URLs use a trailing number but only on pages after the first (e.g. /rankings/medals/all, /rankings/medals/all/2, etc.).