Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A ClojureScript REPL running on Node.JS
Clojure JavaScript
tag: 0.1.5

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
cljs-noderepl
lein-noderepl
.gitignore
README.md
project.clj

README.md

cljs-noderepl

Provides a ClojureScript REPL running on Node.JS.

Leiningen Plugin

To setup the Leiningen plugin, add this to your project.clj or ~/.lein/profiles.clj:

:plugins [[org.bodil/lein-noderepl "0.1.4"]]

Then, start the REPL like this:

$ lein trampoline noderepl

In-Project Usage

Add the following dependency to your project.clj:

[org.bodil/cljs-noderepl "0.1.4"]

To launch the REPL the hard way, run lein repl and enter the following:

(require '[cljs.repl :as repl] '[cljs.repl.node :as node])
(repl/repl (node/repl-env))

Environment

The REPL is connected to a live Node process running a sandboxed environment, which provides all of Node's available global variables.

As an example, here's the standard Node hello world, in REPL ready ClojureScript:

(let [http (js/require "http")
      handler (fn [req res] (.end res "Hello sailor!"))
      server (.createServer http handler)]
  (.listen server 1337))

License

Copyright © 2012 Bodil Stokke.

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

Something went wrong with that request. Please try again.