Repository navigation
feat: serve runs under jolt, and the docs use jolt run for every task - #12
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
servewas the one task that still needed bb, because it binds the port with http-kit. This addssrc/site/serve.jolt, which binds the same Ring handler withring-chez-adapterv0.10.1. jolt loads a.joltfile before the.cljone, so bb keeps usingserve.cljand http-kit unchanged.With every task running under jolt, the README, the
infotask, the usage line and the task docstrings all givejolt run build/clean/test/serve. They also mention that each task still runs under babashka asbb <task>.Checked locally with
jolt run serve:../traversal both get 404bb servestill works, andbb testandjolt run testboth pass (111 tests, 293 assertions).CI has a new step that starts
jolt run serveon 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.