Skip to content

Conversation

teodorlu
Copy link
Contributor

@teodorlu teodorlu commented Sep 6, 2025

Based on the Jetty example, I made a starter for http-kit.

I cut some files and indirection — I felt that would help beginners get started.

Caveat: I noticed the starfederation.datastar.clojure.adapter.http-kit2 namespace, but haven't used it. Not sure what the plans for 1.0 are, maybe it's better get beginners started on http-kit2. I put "draft" on the PR to highlight this.

@JeremS
Copy link
Collaborator

JeremS commented Sep 6, 2025

Thanks for the example!

Could you add running instructions like in the jetty one? That means:

  • adding a :repl alias in deps.edn (you can copy the one from the jetty example)
  • adding the cli invocations to run the repl or the main function in the README (it should be similar to what is in the jetty example)

Concerning the http-kit2 api, I think that it should be the default going forward. It makes the http-kit SDK compatible with all ring middleware, which isn't the case with the first API. At this momen I am still fixing the cljdoc ingestion for the SDK libraries and this API is not documented enough yet. Once cljdoc works I'll review the docstrings for Http-kit2 and will probably make a little guide on how to use it. From there I think I'll recommand using it. For now I'd say you go either way.

Cheers,

@teodorlu teodorlu marked this pull request as ready for review September 6, 2025 21:23
@teodorlu
Copy link
Contributor Author

teodorlu commented Sep 6, 2025

Could you add running instructions like in the jetty one?

Should be done now.

Concerning the http-kit2 api, I think that it should be the default going forward. It makes the http-kit SDK compatible with all ring middleware, which isn't the case with the first API. At this momen I am still fixing the cljdoc ingestion for the SDK libraries and this API is not documented enough yet. Once cljdoc works I'll review the docstrings for Http-kit2 and will probably make a little guide on how to use it. From there I think I'll recommand using it. For now I'd say you go either way.

Got it! I removed the draft status for this PR, then.

@JeremS JeremS merged commit 7604154 into starfederation:main Sep 6, 2025
@JeremS
Copy link
Collaborator

JeremS commented Sep 6, 2025

Thanks!

@teodorlu teodorlu deleted the httpkit-example branch September 7, 2025 06:52
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.

2 participants