serve

command
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Command serve hosts the lab: one page and the web tree, under the same security headers and the same cache contract a deployed game gets, and the world the lab plays in, over GET /ws.

The page and the tree are read from disk, so editing the stylesheet and reloading is the whole loop. The world runs on a fixed tick in one goroutine, because the engine is not safe for concurrent use and was never meant to be; every socket feeds it intents and gets the world back. It answers SIGTERM by closing every socket with 1001 and waiting for them.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL