     200 "HTTP/1.1 200 OK"
     404 "HTTP/1.1 404 Not Found"
     "HTTP/1.1 500 Error"))
-
-(def content-types {".js" "text/javascript"
-                    ".html" "text/html"})
-
-(defn content-type [file-name]
-  (let [idx (.lastIndexOf file-name ".")
-        ext (.substring file-name idx)]
-    (get content-types ext "text/html")))
 
 (defn send-and-close
   "Use the passed connection to send a form to the browser. Send a

    (do (stop-server)
        (reset! server-state {}))))

(defn repl-env [& {:keys [port root] :as opts}]
  (let [opts (merge {:port 9000 :root "" :main "main.js" :goog-base "out/goog/base.js"} opts)]
    (BrowserEvaluator. opts)))

(comment
  
  (require '[cljs.repl :as repl])
  (require '[cljs.repl.browser :as browser])
  (def env (browser/repl-env :main "out/repl.js"))
  (repl/repl env)
  ;; simulate the browser with curl
  ;; curl -v -d "ready" http://127.0.0.1:9000
  ClojureScript:> (+ 1 1)
  ;; curl -v -d "2" http://127.0.0.1:9000

  ;; TODO: You need to figure out when to send a (ns cljs.user) form
  ;; to the browser.

  (let [env {:context :statement :locals {}}]
    (repl/evaluate-form this
                        (assoc env :ns (@comp/namespaces comp/*cljs-ns*))
                        '(ns cljs.user)))
  

  )

  (:require [clojure.string :as str]
            [clojure.java.io :as io]
            [cljs.compiler :as comp]
            [cljs.closure :as cljsc]
            [cljs.repl :as repl])
  (:import java.io.BufferedReader
           java.io.BufferedWriter
