Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A baseline application to get started with Compojure+Shoreleave
JavaScript Clojure
branch: clean

This branch is 10 commits ahead, 22 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
doc
resources
src
.gitignore
LICENSE_epl.html
README.mkd
project.clj

README.mkd

shoreleave

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 feels the same role as ClojureScript:One - it is an example/foundation, that you can build up from.

There are four branches within the repo:

  • clean involves almost no code. It's just a basic template that you can fill in and customize.
  • master involves trival 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-practives for web applications. This includes, but is not limited to client-side cacheing, 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 in resources/config.edn and can be access through the config namespace.

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

TBD

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.

License

Copyright © 2013 Paul deGrandis

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

Something went wrong with that request. Please try again.