     (map char)
     (apply str)))
 
-
-
 (defn get-file-as-mime-type [rez-name mime-type]
   (->>
     (io/resource rez-name)

    (str "data:" mime-type ";base64,")))

(defn get-png-enc [name]
  (get-file-as-mime-type (str  "public/data/" name ".png"), "image/png")
  )

(defroutes routes
  (resources "/")
  (resources "/react" {:root "react"})
  (GET ["/rez/:name.txt" :name #".*"] [name] (get-png-enc name))

  (GET "/*" req (page)))


(deftemplate page (io/resource "index.html") []
  [:body] (if is-dev? inject-devmode-html identity))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn read-file [file-name]

  (let [f (file file-name)
        length (.length f)
        buffer (byte-array length)]
    (println file-name)
    (with-open[in (input-stream (file file-name))]
      (.read in buffer 0 length))
    buffer
    ))


(defn get-enc-64-as-str [file]
  (->>
    file
