Create a project
Let's create a project called
todo-list using Leiningen, the build automation tool for Clojure. This project will run the simplest possible webserver.
On the command line:
lein new todo-list
Take a look at the project structure
Change into the
todo-list directory created by the Leiningen command and see the project structure that has been created.
project.clj- the project definition, written in Clojure
srcfor all the source code
testfor unit test code
tree command is a simple way to see the project structure (alternatively use
ls -R or a graphical file browser).
File names and the Java class path
test directories both contain a directory named
todo_list even though our project is
Unfortunately the Java classpath does not like dashes '-' in directory or file names, so Leiningen changes the directory names to
test/todo_list and the initial test to