♻️ Refactor backend.

Move from custom vertx to jetty9.
This commit is contained in:
Andrey Antukh 2020-05-14 13:49:11 +02:00 committed by Alonso Torres
parent 1639e15975
commit 5a03c13731
82 changed files with 1763 additions and 4667 deletions

View file

@ -25,13 +25,17 @@
(-close [_] "close websocket"))
(defn url
[path]
(let [url (.parse Uri cfg/url)]
(.setPath url path)
(if (= (.getScheme url) "http")
(.setScheme url "ws")
(.setScheme url "wss"))
(.toString url)))
([path] (url path {}))
([path params]
(let [uri (.parse Uri cfg/url)]
(.setPath uri path)
(if (= (.getScheme uri) "http")
(.setScheme uri "ws")
(.setScheme uri "wss"))
(run! (fn [[k v]]
(.setParameterValue uri (name k) (str v)))
params)
(.toString uri))))
(defn open
[uri]