diff --git a/priv/chapter1.html b/priv/chapter1.html index 33a1b7f..a5046b3 100644 --- a/priv/chapter1.html +++ b/priv/chapter1.html @@ -3,10 +3,38 @@ Tank Bison with lazer eyes. - - + diff --git a/priv/index.html b/priv/index.html index 6dd6eab..4b43a93 100644 --- a/priv/index.html +++ b/priv/index.html @@ -3,19 +3,40 @@ Tank Bison with lazer eyes. - + @@ -98,8 +119,6 @@

|| Next Chapter →

- - diff --git a/src/barista-routes.lfe b/src/barista-routes.lfe index 4977b60..15afd59 100644 --- a/src/barista-routes.lfe +++ b/src/barista-routes.lfe @@ -24,6 +24,14 @@ (lfe_io:format "headers: ~p~n" `(,headers)) (barista:response 200 headers body)))) + (('GET (list (binary ("chapter2"))) (= `#m(body ,body) req)) + (progn + (lfe_io:format "Serving up get on chapter 2~n" '()) + (let* ((headers (generate-headers)) + (body (list (template:load "chapter2.html")))) + (lfe_io:format "headers: ~p~n" `(,headers)) + (barista:response 200 headers body)))) + (('POST (list (binary ("chapter1-clicked")) )(= `#m(body ,body) req)) (progn (let* ((headers (generate-headers))