Skip to content

Commit

Permalink
fix: Fix elin.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz committed Feb 20, 2024
1 parent ca613b5 commit 79b453e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dev/elin/dev.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@
[elin.system :as e.system]
[malli.dev :as m.dev]))

(def system-map (atom nil))
(def server-config (atom {}))
(defonce sys (atom nil))

(defn initialize
[{:keys [host port]}]
(let [config (e.config/load-config "." {:server {:host host :port port}})]
(reset! system-map (e.system/new-system config))))
(reset! server-config {:server {:host host :port port}}))

(defn start-system
[]
(when-not @sys
(e.log/info "Starting elin system")
(reset! sys (component/start-system @system-map))
(let [config (e.config/load-config "." @server-config)
system-map (e.system/new-system config)]
(reset! sys (component/start-system system-map)))
::started))

(defn stop-system
Expand Down

0 comments on commit 79b453e

Please sign in to comment.