From 7857a1acf599a116d65e0f05d47c7ba71a1dc06c Mon Sep 17 00:00:00 2001 From: Sebastian Crane Date: Sat, 19 Feb 2022 23:20:52 +0000 Subject: [PATCH] Add main function Signed-off-by: Sebastian Crane --- src/system.clj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/system.clj b/src/system.clj index 9e7a70c..e57f769 100644 --- a/src/system.clj +++ b/src/system.clj @@ -60,3 +60,9 @@ (swap! system-atom stop) (reset! system-atom (system)) (swap! system-atom start))) + +(defn -main [& args] + (let [main-system (atom (system/system))] + (swap! main-system system/start) + (.addShutdownHook (Runtime/getRuntime) + (Thread. (partial swap! main-system stop)))))