Getting Started With Compojure - No Fluff Just Stuff

Getting Started With Compojure

Posted by: Aaron Bedra on August 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.

Aaron Bedra

About Aaron Bedra

Aaron Bedra is a Senior Engineer at DRW, where he works at the intersection trading and technology. He has served as a Chief Security Officer, Chief Technology Officer, and Principal Engineer/Architect. He has worked professionally on programming languages, most notably Clojure and ClojureScript. Aaron is the creator of Repsheet, an open source threat intelligence toolkit. He is the co-author of Programming Clojure, 2nd and 3rd Edition and a contributor to Functional Programming: A PragPub Anthology.

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 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »