In the Wild

While the REPL-based Hello, World is wonderful for getting a feel for writing Clojure, it doesn’t quite capture the whole spirit of the Hello, World exercise. Along with giving you a feel for the language, Hello, World is supposed to get you to work out the details of going from source code stored in a file to a running program. Happily, we’re exactly one command away from getting a real Clojure project set up on disk. All we need is lein new app followed by the name of the application. So if we were creating a book store–related application for Blotts Books (Ms. Flourish has retired) we might say this:

 $ ​​lein​​ ​​new​​ ​​app​​ ​​blottsbooks

Feed that command into your operating system’s command line, and Leiningen will respond ...

Get Getting Clojure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.