serve.j
use httpd;
use io;
def srv as httpd.Server init httpd.listen("127.0.0.1:8080");
io.printf("preview at http://127.0.0.1:8080/ (Ctrl-C stops)\n");
while (true) {
def req as httpd.Request init httpd.accept($srv);
io.printf("%s %s\n", httpd.method($req), httpd.path($req));
httpd.serveDir($req, "public");
}