           (.startsWith line "GET") (read-get line rdr)
           :else {:method :unknown :content line})))
 
+(defn repl-client-js []
+  (slurp @(:client-js @server-state)))
+
 (defn send-repl-client-page
   [opts conn request]
   (send-and-close conn 200
-    (str
-     "<html>
-      <head>
-      <meta charset=\"UTF-8\">
-      <script type=\"text/javascript\" src=\"" (:goog-base opts) "\"></script>
-      <script type=\"text/javascript\" src=\"" (:main opts) "\"></script>
-      <script type=\"text/javascript\">
-      goog.require('clojure.browser.repl');
-      </script>
-      <script>
-      goog.events.listen(window, 'load', function() {
-        clojure.browser.repl.start_evaluator(\"http://" (-> request :headers :host) "\");
-      });
-      </script>
-      </head>
-      <body></body>
-      </html>")
+    (str "<html><head><meta charset=\"UTF-8\"></head><body>
+          <script type=\"text/javascript\">"
+         (repl-client-js)
+         "</script>"
+         "<script type=\"text/javascript\">
+          clojure.browser.repl.client.start(\"http://" (-> request :headers :host) "\");
+          </script>"
+         "</body></html>")
     "text/html"))
 
 (defn handle-get [opts conn request]
   (let [path (:path request)]
     (if (.startsWith path "/repl")
       (send-repl-client-page opts conn request)
-      (let [file (io/file (str (:root opts) path))]
-        (if (.exists file)
-          (send-and-close conn 200 (slurp file) (content-type (.getName file)))
-          (send-404 conn (:path request)))))))
+      (send-404 conn (:path request)))))
 
 (defn- handle-connection
   [opts conn]

(defonce server-state (atom {:socket nil
                             :connection nil
                             :promised-conn nil
                             :return-value-fn nil}))

(defn connection
  "Promise to return a connection when one is available. If a

    200 "HTTP/1.1 200 OK"
    404 "HTTP/1.1 404 Not Found"
    "HTTP/1.1 500 Error"))

(defn send-and-close
  "Use the passed connection to send a form to the browser. Send a
