Getting Started With Compojure

Posted by: Aaron Bedra on 08/11/2009

Getting Started With Compojure

11 Aug 2009

Compojure is a great web framework written in Clojure. Although in its infancy, the project has a lot of promise. The best part is that getting started is a snap!

The only thing you need to have installed on your system is Java and Ant. Everything else is taken care of for you by Compojure. To make things even simpler I have provided a script that does all of the project setup for you. Let’s take a look.

After you have downloaded the script, make sure to make it executable (chmod +x compojure) then run it:

compojure <project name>

where project name is whatever you want it to be. The script will download Compojure and it’s dependencies, do a fresh build, and copy all of the necessary dependencies for your project into the directory you specified. It will then leave you with a <project name>.clj file that has a “Hello World” example built right in. When the script finishes running just run:

./start

and go to http://localhost:8080. You are now up and running on Compojure! To get a better idea of how to work with Compojure you can check out this site.


About Aaron Bedra

Aaron Bedra

Aaron Bedra is a member of Clojure/core and a developer at Relevance, Inc. where he spends his time as a tech lead, speaker and author. He is a frequent contributor to the Clojure language and its supporting libraries as well as an active member of the Clojure community. Aaron has led the development of several commercial Clojure projects and is the co-author with Stuart Halloway of Programming Clojure, 2nd Edition.

More About Aaron »

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 7
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 3
  • Automation Tools: Git, Hudson, Sonar
  • HTML5, Ajax, jQuery, Usability
  • Mobile Applications - iPhone and Android
  • More...
Learn More »

NFJS, the Magazine

December Issue Now Available
  • BDD and REST

    by Brian Sletten
  • Mocks and Stubs in Groovy Tests

    by Kenneth Kousen
  • Algorithms for Better Text Search Results

    by John Griffin
  • Knowns and Unknowns of Scrum and Agile

    by Brian Tarbox
Learn More »