Proxy shadow-cljs requests to http server and fix http server start

This commit is contained in:
heyarne 2020-05-08 11:12:03 +02:00
commit f44a743660
2 changed files with 7 additions and 6 deletions

View file

@ -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)