mirror of
https://github.com/qfpl/applied-fp-course.git
synced 2024-11-29 16:55:12 +03:00
.. | ||
bin | ||
src/FirstApp | ||
changelog.md | ||
default.nix | ||
level01.cabal | ||
level01.nix | ||
LICENCE | ||
README.md | ||
Setup.hs | ||
stack.yaml |
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>
.