Let's do an example that will allow the awful sounding tech jargon to make sense. We will create an extremely basic route, which will simply print out the original request map to the screen. Let's perform the following steps:
Open the
home.clj
file.Alter the
home-routes
defroute such that it looks like this:(defroutes home-routes (GET "/" [] (home-page)) (GET "/about" [] (about-page)) (ANY "/req" request (str request)))
Start the Ring Server if it's not already started.
Navigate to
http://localhost:3000/req
.
You should see something like this: