 
 
 (defn init-db [state]
-  (swap! state #(assoc %1 :conn %2) (db-conn))
+  (let [conn (scratch-conn)]
+    (swap! state #(assoc %1 :conn %2) conn))
+  (init-schema (:conn @state) (:schema @state))
   state)
 
 

                          (swap! server-state update-in [:out-chans] (fn [old new] (vec (remove #(= new %) old))) out-ch)
                          (close! out-ch)))
      (on-receive channel (fn [msg] (let [data (str (dispatch (read-string msg)))]
                                     (send! channel data)
                                     (doall
                                      (map #(put! % data) (remove #{out-ch} (:out-chans @server-state))))))))))

  ;; on first startup initialize datomic schema
  (init-schema (:schema @server-state))


  (get-all-users (:conn @server-state))

)
