Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 53551f3b41
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (32 sloc) 1.18 kb
(ns one.sample.repl
"The starting namespace for the project. This is the namespace that
users will land in when they start a Clojure REPL. It exists to
provide convenience functions like 'go' and 'dev-server'."
(:use [clojure.repl])
(:require [one.tools :as tools]
[one.sample.dev-server :as dev]
[clojure.java.browse :as browse]))
(defn go
"Start a browser-connected REPL and launch a browser to talk to it."
[]
(dev/run-server)
(future (Thread/sleep 3000)
(browse/browse-url "http://localhost:8080/development"))
(tools/cljs-repl))
(defn dev-server
"Start the development server and open the host application in the
default browser."
[]
(dev/run-server)
(future (Thread/sleep 3000)
(browse/browse-url "http://localhost:8080")))
;; This is a convenience function so that people can start a CLJS REPL
;; without having to type in (tools/cljs-repl)
(defn cljs-repl
"Start a ClojureScript REPL."
[]
(tools/cljs-repl))
(println)
(println "Type (go) to launch the development server and setup a browser-connected REPL.")
(println "Type (dev-server) to launch only the development server.")
(println)
Jump to Line
Something went wrong with that request. Please try again.