~pepe/neil

4925354cb852353eabd31847b8230458ef995991 — Josef Pospíšil 3 months ago d6c2aec
Fix nginx ws url
1 files changed, 3 insertions(+), 2 deletions(-)

M neil/service/acts.janet
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))