Initial commit
This commit is contained in:
commit
86c675f22d
42 changed files with 1407 additions and 0 deletions
11
env/dev/clj/geocsv/dev_middleware.clj
vendored
Normal file
11
env/dev/clj/geocsv/dev_middleware.clj
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(ns geocsv.dev-middleware
|
||||
(:require
|
||||
[ring.middleware.reload :refer [wrap-reload]]
|
||||
[selmer.middleware :refer [wrap-error-page]]
|
||||
[prone.middleware :refer [wrap-exceptions]]))
|
||||
|
||||
(defn wrap-dev [handler]
|
||||
(-> handler
|
||||
wrap-reload
|
||||
wrap-error-page
|
||||
(wrap-exceptions {:app-namespaces ['geocsv]})))
|
||||
15
env/dev/clj/geocsv/env.clj
vendored
Normal file
15
env/dev/clj/geocsv/env.clj
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
(ns geocsv.env
|
||||
(:require
|
||||
[selmer.parser :as parser]
|
||||
[clojure.tools.logging :as log]
|
||||
[geocsv.dev-middleware :refer [wrap-dev]]))
|
||||
|
||||
(def defaults
|
||||
{:init
|
||||
(fn []
|
||||
(parser/cache-off!)
|
||||
(log/info "\n-=[geocsv started successfully using the development profile]=-"))
|
||||
:stop
|
||||
(fn []
|
||||
(log/info "\n-=[geocsv has shut down successfully]=-"))
|
||||
:middleware wrap-dev})
|
||||
12
env/dev/clj/geocsv/figwheel.clj
vendored
Normal file
12
env/dev/clj/geocsv/figwheel.clj
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
(ns geocsv.figwheel
|
||||
(:require [figwheel-sidecar.repl-api :as ra]))
|
||||
|
||||
(defn start-fw []
|
||||
(ra/start-figwheel!))
|
||||
|
||||
(defn stop-fw []
|
||||
(ra/stop-figwheel!))
|
||||
|
||||
(defn cljs []
|
||||
(ra/cljs-repl))
|
||||
|
||||
33
env/dev/clj/user.clj
vendored
Normal file
33
env/dev/clj/user.clj
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
(ns user
|
||||
"Userspace functions you can run by default in your local REPL."
|
||||
(:require
|
||||
[geocsv.config :refer [env]]
|
||||
[clojure.pprint]
|
||||
[clojure.spec.alpha :as s]
|
||||
[expound.alpha :as expound]
|
||||
[mount.core :as mount]
|
||||
[geocsv.figwheel :refer [start-fw stop-fw cljs]]
|
||||
[geocsv.core :refer [start-app]]))
|
||||
|
||||
(alter-var-root #'s/*explain-out* (constantly expound/printer))
|
||||
|
||||
(add-tap (bound-fn* clojure.pprint/pprint))
|
||||
|
||||
(defn start
|
||||
"Starts application.
|
||||
You'll usually want to run this on startup."
|
||||
[]
|
||||
(mount/start-without #'geocsv.core/repl-server))
|
||||
|
||||
(defn stop
|
||||
"Stops application."
|
||||
[]
|
||||
(mount/stop-except #'geocsv.core/repl-server))
|
||||
|
||||
(defn restart
|
||||
"Restarts application."
|
||||
[]
|
||||
(stop)
|
||||
(start))
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue