ring

Ken Huang 2025-02-03T08:49:41.766119Z

Are there any deps.edn-based tutorials on how to develop ring apps and deploy it to a cloud? It seems always all I found base on lein. I'm wondering how to run-jetty automatically after I start and jack in to the repl, any ideas?

2025-02-04T14:40:58.673109Z

This is pretty good, uses ring, deploys to fly: https://ryanmartin.me/articles/clojure-fly/ Also gives you a DB and integrant system setup plus aero for config.

❤️ 1
2025-02-04T14:43:11.896109Z

This is also very good, skips integrant for custom system setup so perhaps simpler to get started: https://caveman.mccue.dev/ Also uses ring, but build and deployment steps are missing at the moment. But still very good, definitely worth your time. There’s also a Slack channel #caveman

jcf 2025-02-03T09:26:27.622459Z

I can think of a couple of options: 1. Embed your own nREPL server and invoke your start logic after starting the server 2. Have a side-effectful user.clj somewhere on your development classpath 3. If you’re using Emacs and Cider, use the ns-refresh hooks to start your dev system 4. If you’re using Emacs, write an Emacs Lisp function to jack in and then send your start up code to your running nREPL server Caveat emptor: one and two are problematic — you could end up unable to start a REPL.

Ken Huang 2025-02-03T11:26:41.733579Z

Thanks, James! Thanks for providing so many options.

👍 1
wevrem 2025-02-03T15:12:24.841549Z

What about following one of those tutorials, but converting it yourself to deps instead of lein? Or just stick with lein. If you prefer to use deps, then knowing how to convert is a useful skill because there are a lot of lein-based libraries out there.

Ken Huang 2025-02-03T15:55:05.961059Z

You're right, I've fallen back to use lein at the moment, I feel like its docs are better besides its popularity.

manas_marthi 2025-02-08T15:34:41.015459Z

Hi, Luminus template is great choice. @yogthos wrote a brilliant book called " Web development with Clojure" . It is into its 3rd edition now. It helped me a lot. Great book

❤️ 1
yogthos 2025-02-08T16:28:56.394239Z

Hi, nowadays I'd recommend using Kit which is the successor to Luminus https://kit-clj.github.io/ It's similarly structured, but uses deps and integrant which have become the more popular choice for tooling over the years. Kit also has the advantage of modules where new functionality can be injected in an existing project after it's been created.

👍🏽 1
manas_marthi 2025-02-08T17:32:59.334109Z

when is the 4th edition coming?

yogthos 2025-02-08T18:28:40.693249Z

I might give it a shot if I get some time. Glad to hear you enjoyed the last one by the way. Thanks for the kind words!