 ;; TIME USED: (time-in-hrs + 3.5 1.5 1 + 1) + (5h lørdag, 1t søndag)
 ;; incl.: learning and setting up heroku (1h), learning/troubleshooting (2+h)
 
-(def ^{:static true} server-stop-fn (atom nil))
+(defonce ^{:static true} server-stop-fn (atom nil))
 
 (defn -main [port] ;; entry point
   (let [port (Integer/parseInt port)

(comment ;; for use in REPL
  (-main "5000")
  @current-system-for-repl
  @tmp-sess-atm
  )

  (reset! (:projector system) :prestart)
  (reset! (:session-atom system) {}))

(defonce ^{:doc "Reference to the latest system created to have access to it from the REPL; don't use anywhere else"} current-system-for-repl (atom nil))

(defn init
  "Init the current system, optionally with a default system, returning a Ring handler"
