-
-
Save jaen/4b010b31bfce994549e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nREPL server started on port 58644 on host 127.0.0.1 | |
(dev) | |
WARNING: update already refers to: #'clojure.core/update in namespace: honeysql.helpers, being replaced by: #'honeysql.helpers/update | |
CompilerException java.lang.RuntimeException: EOF while reading, starting at line 8, compiling:(filemporium/endpoints/server_side_pages.clj:34:1) | |
(dev) | |
CompilerException java.lang.Exception: namespace 'filemporium.endpoints.server-side-pages' not found, compiling:(filemporium/system.clj:1:1) | |
(dev) | |
CompilerException java.lang.Exception: namespace 'filemporium.endpoints.server-side-pages' not found, compiling:(filemporium/system.clj:1:1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns dev | |
(:require | |
[clojure.pprint :refer (pprint)] | |
[clojure.reflect :refer (reflect)] | |
[clojure.repl :refer (apropos dir doc find-doc pst source)] | |
[clojure.tools.namespace.repl :as repl-tools] ; :refer (refresh refresh-all)] | |
[clojure.java.io :as io] | |
[com.stuartsierra.component :as component] | |
[tangrammer.component.co-dependency :as co-dependency] | |
[filemporium.system :refer (config new-system-map new-dependency-map new-co-dependency-map)] | |
[modular.maker :refer (make)] | |
[bidi.bidi :refer (match-route path-for)] | |
[modular.wire-up :refer (normalize-dependency-map)])) | |
(repl-tools/disable-reload!) | |
(def system nil) | |
(defn new-dev-system | |
"Create a development system" | |
[] | |
(let [config (config) | |
s-map (-> | |
(new-system-map config) | |
#_(assoc | |
))] | |
(-> s-map | |
(component/system-using (new-dependency-map)) | |
(co-dependency/system-co-using (new-co-dependency-map)) | |
))) | |
(defn init | |
"Constructs the current development system." | |
[] | |
(alter-var-root #'system | |
(constantly (new-dev-system)))) | |
(defn start | |
"Starts the current development system." | |
[] | |
(alter-var-root | |
#'system | |
co-dependency/start-system | |
)) | |
(defn stop | |
"Shuts down and destroys the current development system." | |
[] | |
(alter-var-root #'system | |
(fn [s] (when s (component/stop s))))) | |
(defn go | |
"Initializes the current development system and starts it running." | |
[] | |
(init) | |
(start) | |
:ok | |
) | |
(defn reset [] | |
(stop) | |
(repl-tools/refresh :after 'dev/go)) | |
;; REPL Convenience helpers | |
(defn routes [] | |
(-> system :router :routes)) | |
(defn path->route [path] | |
(match-route (routes) path)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment