                                                          :key       key
                                                          :exception err}))
                                   (close! res-ch)))
-                           (.write ws (js/Uint8Array. (fress/write value)))
+                           (-serialize serializer buf write-handlers value)
+                           (.write ws (js/Uint8Array. (js->clj (.from js/Array @buf))))
                            (.close ws)))
         (.on rs "error" (fn [err]
                           (put! res-ch (ex-info "Could not write edn."

        (close! res-ch)))
    res-ch))

(defn read-edn [path key]
  (let [file-name (str path "/data/" (uuid key))
        res-ch    (chan)]
    (if (.existsSync fs file-name)

      (let [fd    (.openSync fs new-file "w+")
            _     (.closeSync fs fd)
            ws    (.createWriteStream fs temp-file)
            buf   (fress/byte-stream)
            value (up-fn nil)]
        (.on ws "close" #(try
                           (.renameSync fs temp-file new-file)
