-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement stop-prepl
#6
Comments
Hmm this might be good but I think I intended people to just use built in
prepl stuff originally since you can name the prepl and use that...
I'll have a think though! :)
…On Sun, 3 Nov 2019 at 14:59, Rafael Delboni ***@***.***> wrote:
Sometimes I need to restart my dev setup and I want to be sure I don't
have dangling opened prepl connections, I currently use
(clojure.core.server/stop-server) to stop prepl since it uses
server/start-server, but would be a nice touch to have an "official way"
to stop a prepl.
Sample code:
(ns user
(:require
[app.server :as server]
[clojure.tools.namespace.repl :as tools-ns :refer [set-refresh-dirs refresh]]
[propel.core :as propel]))
;; Ensure we only refresh the source we care about. This is important
;; because `resources` is on our classpath and we don't want to
;; accidentally pull source from there when cljs builds cache files there.
(set-refresh-dirs "src/dev" "src/main")
(defn start []
(server/start)
(propel/start-prepl! {:port-file? true}))
(defn restart
"Stop the server, reload all source code, then restart the server.
See documentation of tools.namespace.repl for more information."
[]
(server/stop)
(clojure.core.server/stop-server)
(refresh :after 'user/start))
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6?email_source=notifications&email_token=AACM6XJLU6AP6CBC7UNJ57TQR3RONA5CNFSM4JILUAFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HWOLNJQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACM6XJCEXINALOQTRD2WKTQR3RONANCNFSM4JILUAFA>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes I need to restart my dev setup and I want to be sure I don't have dangling opened prepl connections, I currently use
(clojure.core.server/stop-server)
to stop prepl since it usesserver/start-server
, but would be a nice touch to have an "official way" to stop a prepl.Sample code:
The text was updated successfully, but these errors were encountered: