diff --git a/figwheel-main.edn b/figwheel-main.edn
index 100f791..4e6c10c 100644
--- a/figwheel-main.edn
+++ b/figwheel-main.edn
@@ -1 +1,2 @@
-{:watch-dirs ["src/cljs"]}
+{:watch-dirs ["src/cljs"]
+ :ring-handler googlefit-api-test.core/handler}
diff --git a/src/clj/googlefit_api_test/core.clj b/src/clj/googlefit_api_test/core.clj
index ee83d64..918eeef 100644
--- a/src/clj/googlefit_api_test/core.clj
+++ b/src/clj/googlefit_api_test/core.clj
@@ -5,11 +5,20 @@
[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 "
Page not found
"))
-
-(defn -main []
- (jetty/run-jetty (wrap-reload #'app-routes) {:port 8000})
- (println (str "Server is running on port 8000")))
+;; (defroutes app-routes
+;; (GET "/" [] (resp/resource-response "index.html" {:root "public"}))
+;; (resources "/")
+;; (not-found "Page not found
"))
+
+;; (defn -main []
+;; (jetty/run-jetty (wrap-reload #'app-routes) {:port 8000})
+;; (println (str "Server is running on port 8000")))
+
+(def route-set #{"/" "/tokenpage"})
+
+(defn handler [req]
+ (or
+ (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")))
diff --git a/src/cljs/googlefit-api-test/core.cljs b/src/cljs/googlefit-api-test/core.cljs
index d27fdd0..8f2eaf8 100644
--- a/src/cljs/googlefit-api-test/core.cljs
+++ b/src/cljs/googlefit-api-test/core.cljs
@@ -11,11 +11,11 @@
(println fragment-string)
(defn appended-container [target]
- (let [oauth2-end-point "https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/fitness.activity.read&include_granted_scopes=true&response_type=token&redirect_uri=http%3A//localhost%3A9500&client_id=857819587666-2pm3q0sv9lvmv697afm0k6jblgvtjon9.apps.googleusercontent.com"
+ (let [oauth2-end-point "https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/fitness.activity.read&include_granted_scopes=true&response_type=token&redirect_uri=http%3A//localhost%3A9500/tokenpage&client_id=857819587666-2pm3q0sv9lvmv697afm0k6jblgvtjon9.apps.googleusercontent.com"
form (r/atom (.createElement js/document "form"))
params {:client-id "857819587666-2pm3q0sv9lvmv697afm0k6jblgvtjon9.apps.googleusercontent.com"
- :redirect-uri "http://localhost:9500"
+ :redirect-uri "http://localhost:9500/tokenpage"
:response-type "token"
:scope "https://www.googleapis.com/auth/fitness.activity.read"
:include-granted-scopes "true"}