Giter Site home page Giter Site logo

strongh / compojure Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weavejester/compojure

1.0 2.0 0.0 5.5 MB

Concise web framework for Clojure

Home Page: http://groups.google.com/group/compojure

License: Eclipse Public License 1.0

Clojure 100.00%

compojure's Introduction

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

An Example

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

(ns hello-world
  (:use compojure.core, ring.adapter.jetty)
  (:require [compojure.route :as route]))

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

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

Documentation

Breaking Changes

As of version 0.6.0, Compojure no longer adds default middleware to routes. This means you must explicitly add the wrap-params and wrap-cookies middleware to your routes.

To make this a little easier, the compojure.handler namespace provides functions that add common middleware functions to your routes.

Installing

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

[compojure "1.0.0"]

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.

compojure's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.