Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Calculate the magnitude of a given laugh

branch: master

Merge pull request #2 from priyatam/master

upgrade dependencies, code for 'inspect http requests', and clarified usage in docs
latest commit d533df1478
Phil Hagelberg authored November 29, 2013
Octocat-spinner-32 src added missing code from original blog: inspect HTTP requests November 27, 2013
Octocat-spinner-32 test Initial commit April 09, 2012
Octocat-spinner-32 .gitignore ignore all .lein-* November 27, 2013
Octocat-spinner-32 Procfile Initial commit April 09, 2012
Octocat-spinner-32 clarified env usage November 27, 2013
Octocat-spinner-32 project.clj added main method November 27, 2013


Calculate the magnitude of a given laugh over HTTP and JSON.

Really just used as a demonstration of an HTTP-based remote REPL.

See Debugging Clojure apps with Drawbridge.


This requires Leiningen 2 on the client side.

To set env vars (pre-requisite):

EXPORT AUTH_PASS=reindeerflotilla

To start a web server:

$ lein run

To calculate a laugh:

$ curl http://localhost:5000 -d hahahaha
{"hahahaha": 4, "percentile": 100.0}

To connect a REPL to the running app:

$ lein repl :connect http://flynn:reindeerflotilla@localhost:5000/repl


Copyright © 2012 Phil Hagelberg

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.