Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Concise web framework for Clojure

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE.html
Octocat-spinner-32 README.md
Octocat-spinner-32 project.clj
README.md

Compojure is a small, open source web framework for the Clojure programming language.

This is the latest development version of Compojure. For the latest stable version, see 0.3.2.

An Example

Here's a small web application written using Compojure and Ring.

(ns hello-world
  (:use compojure.core
        ring.adapter.jetty))

(defroutes main-routes
  (GET "/" []
    "<h1>Hello World</h1>")
  (ANY "*" []
    {:status 404, :body "<h1>Page not found</h1>"}))

(run-jetty main-routes {:port 8080})

Installing

The easiest way to use Compojure in your own projects is via Leiningen. Add the following dependency to your project.clj file:

[compojure "0.4.0-SNAPSHOT"]

To build Compojure from source, run the following commands:

lein deps
lein jar

Mailing List

Compojure has a Google Group. This is the best place to ask questions and report bugs.

Something went wrong with that request. Please try again.