Proxy shadow-cljs requests to http server and fix http server start
This commit is contained in:
parent
a80842101c
commit
f44a743660
2 changed files with 7 additions and 6 deletions
|
|
@ -8,8 +8,8 @@
|
|||
(:gen-class))
|
||||
|
||||
(router/defroutes app
|
||||
(router/POST "/upload" [req]
|
||||
(println "/upload" req)
|
||||
(router/POST "/upload" [& args]
|
||||
(println "/upload" args)
|
||||
{:status 400})
|
||||
(router/GET "/" []
|
||||
(slurp (io/resource "public/index.html")))
|
||||
|
|
@ -24,12 +24,11 @@
|
|||
(@server :timeout 100)
|
||||
(reset! server nil)))
|
||||
|
||||
|
||||
(defn -main [& args]
|
||||
(println "Starting server on port" (env :port))
|
||||
(reset! server (-> #'app
|
||||
(logger/wrap-with-logger
|
||||
(http/run-server {:port (env :port)})))))
|
||||
(logger/wrap-with-logger)
|
||||
(http/run-server {:port (env :port)}))))
|
||||
|
||||
#_(-main)
|
||||
#_(stop-server)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue