Skip to content

feat: serve runs under jolt, and the docs use jolt run for every task - #12

Merged
burinc merged 1 commit into
mainfrom
feat/jolt-serve
Nov 18, 2026
Merged

burinc merged 1 commit into
mainfrom
feat/jolt-serve

Conversation

@burinc

@burinc burinc commented Nov 18, 2026

Copy link
Copy Markdown
Member

serve was the one task that still needed bb, because it binds the port with http-kit. This adds src/site/serve.jolt, which binds the same Ring handler with ring-chez-adapter v0.10.1. jolt loads a .jolt file before the .clj one, so bb keeps using serve.clj and http-kit unchanged.

With every task running under jolt, the README, the info task, the usage line and the task docstrings all give jolt run build/clean/test/serve. They also mention that each task still runs under babashka as bb <task>.

Checked locally with jolt run serve:

  • pages, CSS and a PNG come back with the right content types, and the PNG is byte-identical
  • paths outside the base path and ../ traversal both get 404
  • it listens on 127.0.0.1 only, and Ctrl-C stops it

bb serve still works, and bb test and jolt run test both pass (111 tests, 293 assertions).

CI has a new step that starts jolt run serve on a free port. It checks for a 200 under the base path, a 404 outside it, and a random binary asset that comes back unchanged. I ran that step's script locally first.

site/serve.jolt binds the preview server with ring-chez-adapter v0.10.1.
jolt resolves it before serve.clj, so bb keeps http-kit. Under jolt it
serves pages, CSS and binary assets byte for byte, 404s outside the base
path, binds 127.0.0.1 only and exits on Ctrl-C.

The README, the info task, the usage line and the task docstrings now give
jolt run build/clean/test/serve, and say every task also runs as bb <task>.
CI starts jolt run serve on a free port and checks it.
@burinc
burinc merged commit ab900b3 into main Nov 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant