[back/chore] ring-jetty -> http-kit

This commit is contained in:
SouthFox 2023-08-25 20:25:55 +08:00
parent 6a63ad2cac
commit ac66839ee2
2 changed files with 6 additions and 8 deletions

View file

@ -9,8 +9,8 @@
[thheller/shadow-cljs "2.25.2"]
[com.google.javascript/closure-compiler-unshaded "v20230802"]
[ring/ring-core "1.11.0-alpha1"]
[ring/ring-jetty-adapter "1.11.0-alpha1"]
[org.babashka/http-client "0.4.14"]
[http-kit "2.7.0"]
[org.jsoup/jsoup "1.16.1"]
[cheshire "5.11.0"]
@ -28,7 +28,7 @@
:profiles
{:uberjar {:dependencies ^:replace [[org.clojure/clojure "1.11.1"]
[ring/ring-jetty-adapter "1.11.0-alpha1"]
[http-kit "2.7.0"]
[metosin/reitit "0.7.0-alpha5"]
[org.slf4j/slf4j-nop "2.0.7"]
[org.babashka/http-client "0.4.14"]

View file

@ -1,5 +1,5 @@
(ns backend.core
(:require [ring.adapter.jetty :refer [run-jetty]]
(:require [org.httpkit.server :as server]
[reitit.ring :as ring]
[ring.util.response :refer [resource-response content-type]]
[backend.handlers :as handlers])
@ -20,12 +20,10 @@
{:not-found (constantly {:status 404 :body "Not found"})}))))
(defn -main [& args]
(run-jetty #'app {:port 3000
:join? false}))
(server/run-server #'app {:port 3000}))
;; (def server (run-jetty #'app {:port 3000
;; :join? false}))
;; (.stop server)
;; (def web-server (server/run-server #'app {:port 3000}))
;; (web-server)
;; (app {:request-method :get
;; :uri "/api/hp/431038004"
;; })