A smarter client-side in ClojureScript
Shoreleave is a collection of integrated libraries that focuses on:
- Idiomatic interfaces
- Common client-side strategies
- HTML5 capabilities
- ClojureScript's advantages
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:
cleaninvolves almost no code. It's just a basic template that you can fill in and customize.
masterinvolves trival code that illustrates proper usage of the most common Shoreleave modules.
kitchensinkinvolves ALL Shoreleave modules working in concert. This is great to smoketest Shoreleave.
incubatorinvolves all new features being tested or developed for Shoreleave. DO NOT USE THIS BRANCH
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
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:
- 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.