3 ms·
Agree on the Java ecosystem. I deployed a toy app using Tomcat a couple of months ago, and now I have no idea how to update it. I lost the "tutorial" I found an
by john2x 13y ago
Agree on the Java ecosystem. I deployed a toy app using Tomcat a couple of months ago, and now I have no idea how to update it. I lost the "tutorial" I found and can't remember what it was (stupid mistake), but still, the fact that I had to resort to a pretty unknown tutorial to deploy something shows how desperate I was.
I'm looking for another language with similar philosophy to Clojure's, but with a better ecosystem.
- chc 13y agoFYI, you could have just used http-kit. If you don't want an enterprisey ecosystem, don't use the enterprisey stuff. That's how I use it.
- john2x 13y agoHmm not really clear what it's for. Is it a replacement for Jetty/Tomcat?
- chc 13y agohttp-kit lets you run your own app server like Node.js does instead of sticking it in a servlet container. You just call run-server and you've got a working web app. So yeah, basically a Jetty replacement, but it's less tied into the Java ecosystem and more into Clojure.
- john2x 13y agoOh ok. Not familiar with Node.js but if it means getting out of Java then definitely worth a deeper look. Thanks. Have any links to quickstart type tutorials? Something that allows someone to deploy a (toy) webapp?
- danneu 13y agoClojure has a simple scratch->toyapp->deploy workflow. It's just that to find it as a newcomer, you either: A. Luck out and find it immediately. B. Get directed to it by someone more experienced. C. Chase a suboptimal solution because you don't know better. You simply don't know there's an easier workflow. You don't know you can eval code within an editor. You don't know there are tools like paredit or how they'd help you. For toy webapps, it's good to know these incantations: lein new compojure myapp (creates webapp skeleton) lein ring server (starts embedded server for dev) Here's the live demo of a dumb app I threw together to take an IRC joke too far: http://www.danneu.com/spinners/ http://www.danneu.com/spinners/ And here's the Clojure code: https://github.com/danneu/spinners-as-a-service/blob/master/src/spinners_as_a_service/handler.clj https://github.com/danneu/spinners-as-a-service/blob/master/... To deploy it, I rsync the repo to a remote server, run `lein uberjar` remotely, and launch the uberjar. That repo shows how to use Compojure for routing, Hiccup for html, Clojurescript, and a few incantations (like `:genclass`) to get it working.