A baseline application to get started with Compojure+Shoreleave
JavaScript Clojure
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



A smarter client-side in ClojureScript

###Shoreleave is a collection of integrated libraries that focuses on:

  • Security
  • Idiomatic interfaces
  • Common client-side strategies
  • HTML5 capabilities
  • ClojureScript's advantages

It builds upon efforts found in other ClojureScript projects, such as Fetch and ClojureScript:One.

Shoreleave-baseline Overview

Shoreleave-baseline is a starting point for building applications with Ring+Compojure+lib-noir+Shoreleave. It fills the same role as ClojureScript:One - it is an example/foundation from which you can build up.

There are four branches within the repo:

  • clean involves almost no code. It's a minimal, running template app that you can fill in and customize.
  • master involves trivial code that illustrates proper usage of the most common Shoreleave modules.
  • kitchensink involves ALL Shoreleave modules working in concert. This is great to smoketest Shoreleave.
  • incubator involves all new features being tested or developed for Shoreleave. DO NOT USE THIS BRANCH

Batteries included

Shoreleave-baseline is already wired up to do a host of best-practices for web applications. This includes, but is not limited to client-side caching, compression, and CSRF protection (all via Ring Middleware).

A sane file structure has been imposed on the example, as well as smart default options. A central config file for the app can be found at resources/config.edn and is accessed through the config namespace. The config system can easily be replaced with environ or carica.

The compiled JavaScript file is also included in every branch, to ensure there is always a runnable example.

Launching the server

The server can be launched in a few ways.

  • From the REPL with: (defonce server (start-server))
  • Launching a quick dev server with: lein run
  • Launching a dev server with Lein Ring: lein ring server
  • Launching a prod server with Lein Ring: lein with-profile production ring server-headless

File structure and outline


Plays well with others

Shoreleave makes no assumptions about other libraries you might be using in your application.

You should extend the example in anyway that makes sense.


Copyright © 2013 Paul deGrandis

Distributed under the Eclipse Public License, the same as Clojure. Please see the LICENSE_epl.html for details.