Enable customizing the nrepl websocket port (#141)

* Enable customizing the nrepl websocket port

* Fixes #140

* Update changelog
This commit is contained in:
Peter Strömberg 2025-12-05 23:07:09 +01:00 committed by GitHub
parent c449f55a9b
commit 93cb7874bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 1 deletions

View file

@ -8,7 +8,9 @@
(when-let [ws-port (.-SCITTLE_NREPL_WEBSOCKET_PORT js/window)]
(set! (.-ws_nrepl js/window)
(new js/WebSocket (ws-url (.-hostname (.-location js/window)) ws-port "_nrepl"))))
(new js/WebSocket (ws-url (or (.-SCITTLE_NREPL_WEBSOCKET_HOST js/window)
(.-hostname (.-location js/window)))
ws-port "_nrepl"))))
(when-let [ws (nrepl-server/nrepl-websocket)]
(set! (.-onmessage ws)