0

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?

Alex Miller
  • 69,183
  • 25
  • 122
  • 167
dirtymikeandtheboys
  • 511
  • 2
  • 5
  • 17

1 Answers1

0

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")))
Nathan Tuggy
  • 2,237
  • 27
  • 30
  • 38
henryw374
  • 377
  • 4
  • 14