The following compojure routes work.
(defroutes app-routes
(GET "/" [] (index))
(GET "/twauth" [] (tw/authorize))
(ANY "/twcallback" [] (do
(tw/callback)
(index)))
(route/resources "/")
(route/not-found "Not Found"))
(def app (handler/site app-routes))
However I get error with the following. It throws a java.nullpointer.exception. What am I doing wrong here ?
(defroutes app-routes (GET "/" [] (index)) (GET "/twauth" [] (tw/authorize)) (ANY "/twcallback" [] (do (tw/callback) (index))))
(defroutes base-routes
(route/resources "/")
(route/not-found "Not Found"))
(def app
(-> app-routes
base-routes
handler/site))