1
1
mirror of https://github.com/qfpl/applied-fp-course.git synced 2024-11-29 16:55:12 +03:00
applied-fp-course/level01
2018-02-09 11:33:59 +10:00
..
bin Added -fwarn-missing-import-lists to GHC options. Fixed resulting errors 2017-09-12 13:28:27 +10:00
src/FirstApp Add imports to level01/FirstApp/Main. Remove an undefined from Test.hs in level04. Update readme for cabal install instructions. Fixes #1 2018-01-10 17:09:43 +10:00
changelog.md change changelog files to lowercase 2017-09-01 11:17:26 +10:00
default.nix Overhauled nix file setup to be more like the other QFPL projects. 2017-09-18 10:14:29 +10:00
level01.cabal Updates based on course run feedback. 2018-01-16 12:36:57 +10:00
level01.nix Overhauled nix file setup to be more like the other QFPL projects. 2017-09-18 10:14:29 +10:00
LICENCE update copyright notice 2017-09-12 11:51:26 +10:00
README.md Minor adjustments. Fix some remaining capitalisation issues for runDB 2018-02-09 11:33:59 +10:00
Setup.hs Added two stages. 2017-08-09 13:06:21 +10:00
stack.yaml Update to stackage LTS 10 (GHC 8.2.2) 2018-01-31 12:20:33 +11:00

Level 01

The purpose of this exercise is to whet our appetite by creating a basic web app. The focus will be on reading the Hackage documentation for the Wai framework. Consult the src/FirstApp/Main.hs to find the parts that are missing and what we need from the Wai package to build our "Hello, World!" application.

Our "application" will respond to ALL incoming requests with a 200 status code response and the message "Hello, World!".

Running the program

To run the application:

# With Cabal
$ cabal run level01-exe

# With Stack
$ stack exec level01-exe

Accessing the program

# Using curl
$ curl -XGET localhost:<port number>

You can also use a browser and go to http://localhost:<port number>.