prplz / code-golf

Code Golf is a game designed to let you show off your code-fu by solving problems in the least number of characters.

Home Page:https://code-golf.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code Golf

This is the repository behind https://code.golf

Quickstart

  1. Install dependencies:
  1. 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" ✅
  1. Build the assets:
$ ./build-assets
  1. Bring up the website:
$ make dev
  1. Optionally, load information from the code.golf database.
go run utils/update_sql_from_api.go
  1. Navigate to https://localhost

Hacking

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 .

Testing

  1. Run the unit tests:
$ make test
  1. Run the e2e tests:
$ make e2e

Style

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.).

About

Code Golf is a game designed to let you show off your code-fu by solving problems in the least number of characters.

https://code-golf.io

License:MIT License


Languages

Language:JavaScript 70.9%Language:Go 14.0%Language:Dockerfile 3.8%Language:HTML 3.7%Language:CSS 2.1%Language:C 1.8%Language:Raku 1.2%Language:C# 1.0%Language:PLpgSQL 0.6%Language:Makefile 0.3%Language:Perl 0.2%Language:F# 0.2%Language:Shell 0.2%Language:Nim 0.0%