Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (25 sloc) 965 Bytes
(ns dev
(:require [io.pedestal.service.http :as bootstrap]
[{{name}}.service :as service]
[{{name}}.server :as server]))
(def service (-> service/service ;; start with production configuration
(merge {:env :dev
;; do not block thread that starts web server
::bootstrap/join? false
;; reload routes on every request
::bootstrap/routes #(deref #'service/routes)
;; all origins are allowed in dev mode
::bootstrap/allowed-origins (constantly true)})
(defn start
[& [opts]]
(server/create-server (merge service opts))
(bootstrap/start server/service-instance))
(defn stop
(bootstrap/stop server/service-instance))
(defn restart
Something went wrong with that request. Please try again.