https://github.com/weavejester/compojure
A concise routing library for Ring/Clojure
https://github.com/weavejester/compojure
clojure http ring routing
Last synced: 6 months ago
JSON representation
A concise routing library for Ring/Clojure
- Host: GitHub
- URL: https://github.com/weavejester/compojure
- Owner: weavejester
- License: epl-1.0
- Created: 2008-05-01T00:31:39.000Z (over 17 years ago)
- Default Branch: master
- Last Pushed: 2024-01-31T18:54:43.000Z (almost 2 years ago)
- Last Synced: 2025-05-03T02:42:16.669Z (6 months ago)
- Topics: clojure, http, ring, routing
- Language: Clojure
- Homepage:
- Size: 5.6 MB
- Stars: 4,104
- Watchers: 107
- Forks: 259
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-clojure - Compojure
- stars - weavejester/compojure - A concise routing library for Ring/Clojure \[*Eclipse Public License 1.0*\] (⭐️4107) (Clojure)
- stars - weavejester/compojure - A concise routing library for Ring/Clojure \[*Eclipse Public License 1.0*\] (⭐️4094) (Clojure)
- awesome-open-source-applications - Clojure Compojure - commit/weavejester/compojure) |  | (Back-End Development)
- awesome-open-source-applications - Clojure Compojure - commit/weavejester/compojure) |  | (Back-End Development)
README
# Compojure
[](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.7.1"]
## Documentation
* [Wiki](https://github.com/weavejester/compojure/wiki)
* [API Docs](http://weavejester.github.io/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 "/" [] "
Hello World
")
(route/not-found "Page not found
"))
```
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 © 2024 James Reeves
Distributed under the Eclipse Public License, the same as Clojure.