anchor.diff:  Connection: Keep-Alive
   Date: Fri, 17 Jun 2016 16:44:23 GMT
   Last-Modified: Fri, 17 Jun 2016 16:43:02 GMT
  -ETag: -1727906851
  +ETag: fa863bd7ff53786d286e4bb3c0134416
   Content-Type: text/plain;charset=utf-8
   Vary: accept-charset
   Content-Length: 23
  
positive.code: user=>
  ----
  
  == View the source
  
  Fire up an editor and load up the file `src/edge/web.clj`.
  
  Locate the function called `content-routes` and search for the `"Hello World!"` string.
  
  [source,clojure]
  ----
  (defn content-routes [_]
    ["/"
     [ <1>
      ["index.html"
       (->
        (templated-page-resource "index.html" (fn [ctx] {:foo "bar" :ctx ctx}))
        (assoc :id ::index))]
  
      ["" (yada/redirect ::index)]
  
      ;; Add some pairs (as vectors) here. First item is the path, second is the handler.
      ;; Here's an example
      ["hello" (yada/handler "Hello World!\n")] <2>
  
  
  <<<<<<< Updated upstream
  [source,clojure]
  ----
  ["hello" (yada/handler "Hello World!\n")]
  ----
  
  If you have curl on your machine, use it to send it a web request. Alternatively, use a web browser.
  
  [source]
  ----
  curl -i http://localhost:3000/test
  ----
  
  You should see something similar to the following:
  
  [source]
  ----
  HTTP/1.1 200 OK
  Content-Length: 15
  Content-Type: text/plain;charset=utf-8
  Last-Modified: Wed, 15 Jun 2016 10:17:03 GMT
  Vary: accept-charset
  ETag: -1277479543
  Server: Aleph/0.4.1
  Connection: Keep-Alive
  Date: Wed, 15 Jun 2016 10:17:06 GMT
  
  Hello World!
  ----
  
  Now make a change to this line.
  
  [source,clojure]
  ----
  ["hello" (yada/handler "Hello Wonderful World!\n")]
  ----
  
  Go to your REPL and reset your system to pick up the changes:
  
  [source]
  ----
  user=> (reset)
  :reloading (edge.web edge.server edge.system user)
  :resumed
  ----
  
  Try the curl command (or web browser) again and verify the updated result.
  
  If it works, you're now ready to proceed with link:{next}[next chapter], where we will discuss this example in more depth.
  =======
      [""
       (-> (yada/as-resource (io/file "target"))
           (assoc :id ::static))]
  
      ]])
  ----
  
  <1> The start of a series of vector pairs. These associate URI paths with handlers.
  <2> Change the string here from `"Hello World"` to `"Hello Wonderful World"`.
  
  Now go back to your REPL and enter `(reset)`.
  
  Finally, refresh your browser — http://localhost:3000 — and check that the message has changed.
  
  == Introducing Resources
  
  Edge uses a link:https://github.com/juxt/bidi[bidi] route structure to define URI paths.
  
  
negative.code: 
  == URIs and Routing
  
  A resource is not the same thing as its identifier (its URI). In Edge, that's why we need to combine [yada]#yada# with bidi.
  
  Think of the path as (part of) the *I* in *URI*, and the resource as the *R*. The route structure is where URI paths are associated with the resources they identify. This separation of concerns is very important to grasp as from now on we'll seldom mention URIs, since [yada]#yada# is about _resources_, not routing.
  
  == Examining the response
  
  