O'Reilly logo

Introduction to JVM Languages by Vincent van der Leun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a page to the web application

As an exercise, let's add a new page to the application. Here are the requirements:

  • The page's URL must be /monadtest
  • It should make use of the existing home-routes route. This route calls middleware that protects the application against specific web attacks.
  • It will use an HTML page with a form that renders the entered text using the pretty-msg function

The page will make use of the pretty-msg function that we wrote in the Exploring Monads section.

In the project.clj build file, add the org.clojure/algo.monads dependency by copying and pasting its dependency line from the exploring-monads/project.clj file to the dependencies section of the myapp/project.clj file. After saving the file, Counterclockwise ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required