|
|
|
@@ -1,18 +1,5 @@ |
|
|
|
(ns googlefit-api-test.core |
|
|
|
(:require [compojure.core :refer [defroutes ANY POST GET]] |
|
|
|
[compojure.route :refer [not-found resources]] |
|
|
|
[ring.adapter.jetty :as jetty] |
|
|
|
[ring.util.response :as resp] |
|
|
|
[ring.middleware.reload :refer [wrap-reload]])) |
|
|
|
|
|
|
|
;; (defroutes app-routes |
|
|
|
;; (GET "/" [] (resp/resource-response "index.html" {:root "public"})) |
|
|
|
;; (resources "/") |
|
|
|
;; (not-found "<h1>Page not found</h1>")) |
|
|
|
|
|
|
|
;; (defn -main [] |
|
|
|
;; (jetty/run-jetty (wrap-reload #'app-routes) {:port 8000}) |
|
|
|
;; (println (str "Server is running on port 8000"))) |
|
|
|
(:require [ring.util.response :as resp])) |
|
|
|
|
|
|
|
(def route-set #{"/" "/tokenpage"}) |
|
|
|
|
|
|
|
@@ -21,4 +8,4 @@ |
|
|
|
(when (route-set (:uri req)) |
|
|
|
(some-> (resp/resource-response "index.html" {:root "public"}) |
|
|
|
(resp/content-type "text/html; charset=utf-8"))) |
|
|
|
(not-found "Not found"))) |
|
|
|
(resp/not-found "Not found"))) |