0
votes

I have a defroutes like:

(defroutes app-routes
  (context "first" []
    (GET "/" [] "first first"))
  (context "second" []
    (GET "/" [] "first second")))

But when I try to visit /second I just get a 404. What am I supposed to do?

1

1 Answers

0
votes

Minor, but important detail: you are missing leading slashes on the context declarations, so for example "/first", not "first".

(defroutes app-routes
  (context "/first" []
    (GET "/" [] "first first"))
  (context "second" []
    (GET "/" [] "first second")))