           (let [path     (tmp-path f)
                 spec     (-> f tmp-file slurp read-string)
                 client-ns (str "adzerk.boot-reload." (rutil/path->ns path))
-                out-file (io/file tmp path)]
-            (write-cljs! tmp client-ns url ws-host (get spec :on-jsload on-jsload) asset-host)
+                out-file (io/file tmp path)
+                client-opts (merge {:on-jsload on-jsload
+                                    :asset-host asset-host}
+                                   (:boot-reload spec))]
+            ;; ws-host is used by client, but is not client option because it mainly used by server
+            (write-cljs! tmp client-ns url ws-host client-opts)
             (add-init! client-ns spec out-file path)))
 
         ;; Special case: boot-cljs used without .cljs.edn

        ;; If file already exists, do nothing.
        (when (and (empty? (relevant-cljs-edn fileset ids))
                   (nil? (b/tmp-get (.getPath (rutil/ns->file "adzerk.boot-reload" "cljs")))))
          (write-cljs! tmp "adzerk.boot-reload" url ws-host on-jsload asset-host))

        (reset! prev-pre fileset)
        (let [fileset (-> fileset (add-resource tmp) commit!)

    (util/info "Starting reload server on %s\n" (format "%s://%s:%d" proto listen-host port))
    (format "%s://%s:%d" proto client-host (or ws-port port))))

(defn- write-cljs! [tmp client-ns url ws-host {:keys [on-jsload asset-host]}]
  (util/info "Writing %s to connect to %s...\n" (.getPath (rutil/ns->file client-ns "cljs")) url)
  (let [out (doto (rutil/ns->file tmp client-ns "cljs")
              io/make-parents)]
