File: README.md

package info (click to toggle)
compojure-clojure 1.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 200 kB
  • sloc: xml: 113; makefile: 29
file content (48 lines) | stat: -rw-r--r-- 1,217 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Compojure

[![Build Status](https://travis-ci.org/weavejester/compojure.svg?branch=master)](https://travis-ci.org/weavejester/compojure)

Compojure is a small routing library for [Ring][1] that allows web
applications to be composed of small, independent parts.

## Installation

Add the following dependency to your `project.clj` file:

    [compojure "1.6.0"]

## Documentation

* [Wiki](https://github.com/weavejester/compojure/wiki)
* [API Docs](http://weavejester.github.com/compojure)

## Community

* [Google Group](http://groups.google.com/group/compojure)
* #compojure on [Freenode](http://freenode.net/) IRC

## Usage

This small Compojure application demonstrates creating a Ring handler
from two routes:

```clojure
(ns hello-world.core
  (:require [compojure.core :refer :all]
            [compojure.route :as route]))

(defroutes app
  (GET "/" [] "<h1>Hello World</h1>")
  (route/not-found "<h1>Page not found</h1>"))
```

Also refer to the [Getting Started][2] page on the wiki.

[1]:https://github.com/ring-clojure/ring
[2]:https://github.com/weavejester/compojure/wiki/Getting-Started

## License

Copyright © 2017 James Reeves

Distributed under the Eclipse Public License, the same as Clojure.