1. happs intro
  2. the missing happs documentation
  3. getting started with happs
  4. prerequisites
  5. cabal install me
  6. main
  7. url handling
  8. templates
  9. stringtemplate basics
  10. debugging
  11. form data: get and post
  12. form data: file uploads
  13. cookies
  14. introduction to macid
  15. using macid safely
  16. macid dummy data
  17. macid updates and queries
  18. changing the data model
  19. macid stress test
  20. limitations of macid
  21. foreign characters
  22. cron jobs
  23. thanks
  24. appendix (floundering in ghci)

Basic Request Handling in HAppS

One of the most basic functions of a web framework is to give you a way of controlling what happens when a web browser makes an http request.

Let's look at some simple examples.

  1. Read the source code of the simpleHandlers function in ControllerBasic.hs to see how urls are handled in HAppS. Pay attention to the comments!
  2. Follow the urls below by clicking on them. Match what happens when you click on a link with the code in ControllerBasic.hs

The static file serving example above hints at the templating system used by this tutorial to put together web pages behind the scenes.

We learn about using templates with HAppS next.