M neil/service/acts.janet => neil/service/acts.janet +3 -2
@@ 85,10 85,11 @@
(def name (match-first '(* '(to ".jdn") ".jdn" -1) config))
(with [f (file/open (path/join nginx (. name "-http")) :wb)]
(with-dyns [:out f]
- (http/render-dict (merge http {:code code-path}))))
+ (http/render-dict {:url (http :url) :code code-path})))
+ (def ws-url (match-first '(* (thru "//") '(to -1)) (ws :url)))
(with [f (file/open (path/join nginx (. name "-ws")) :wb)]
(with-dyns [:out f]
- (ws/render-dict (merge ws {:code code-path})))))
+ (ws/render-dict {:code code-path :url ws-url}))))
(define-effect ReloadNginx [&]
(os/execute ["service" "nginx" "reload"] :p))