Book Image

Clojure Web Development Essentials

By : Ryan Baldwin
Book Image

Clojure Web Development Essentials

By: Ryan Baldwin

Overview of this book

Table of Contents (19 chapters)
Clojure Web Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Serving the signup form


For now, we'll just use the existing src/hipstr/routes/home.clj file to house our route to the sign up form. Our sign up form will use the POST method to send the data to a different URL, so the route to the sign up form itself needs to be GET. Adjust hipstr.routes.home/home-routes to look like this:

(defroutes home-routes
  (GET "/" [] (home-page))
  (GET "/about" [] (about-page))
  (GET "/signup" [] "Hey there, welcome to the signup page!"))

Now when you save this and click the sign up button, we get a cute but completely useless salutation. So, let's get a little creative and create the actual sign up page.