typical way of running clojure programs

clojure

Solution

Since you found leiningen straight off you're on the right track. It's not a silly question because answering it will help others get better google results.

each clojure program should be a separate leiningen project, so you run `lein new project-name` for each of them.

the result of building a Clojure project is the same as a Java project, a JAR file that gets run with `java -jar myproject-standalone.jar` for instance

leiningen can build a wrapper shell script for you that produces a .sh file that just calls java -jar

When I run clojure programs in production at work we just check them out of git and then call `lein run` in the directory (actually Jenkins does this).

Problem

I'm new to Clojure and really confused about how I should run Clojure programs. My first question is whether every Clojure program is a Leiningen package? If I want to write do I start by creating a new Leiningen project? Is there a to run Clojure programs similar to Python(ie `python pyfile.py`) I realize this might be a stupid question, but I've been confused about this for a while and the few books/tutorials I've gone through don't seem to answer this question properly. Upto now, I've been running Clojure code just in the REPL.

Original source