Add bits of example bundle documentation.

* Cleanup foo1_0 hello example.
This commit is contained in:
Christopher Reichert 2014-12-19 15:02:26 -06:00
parent 3d075f1103
commit a95ae52a4b
3 changed files with 21 additions and 11 deletions

View File

@ -1,5 +1,7 @@
# Keter Configuration Examples
#
# See README.md for build details
# Build test bundles. See README.md
GHC?=ghc

View File

@ -1,9 +1,13 @@
# Keter Configuration Examples
Build all examples:
$ make
The resulting build will attempt to use the package-db
in the parent directory,
Build Keter app bundle with V1.0 configuration syntax:
$ make foo1_0
@ -15,3 +19,9 @@ Build Keter websocket app bundle:
Build Keter app bundle with V0.4 configuration syntax:
$ make foo
The resulting bundles are moved into the ./incoming folder and will be
unpacked and served by Keter. You can use `make clean` to clean the
incoming directory and remove all bundles.

View File

@ -25,13 +25,11 @@ main = do
liftIO $ hFlush stdout
liftIO $ hPutStrLn stderr $ "Testing standard error"
liftIO $ hFlush stderr
send $ responseLBS status200 [("content-type", "text/plain")] $ L8.pack $ unlines
$ ("Message: " ++ msg)
: ("Path: " ++ fp)
: ("Headers: " ++ show (requestHeaders req))
: map (\(k, v) -> concat
[ "Env: "
, k
, " = "
, v
]) env
send $ responseLBS status200 [("content-type", "text/plain")]
$ L8.pack $ unlines
$ ("Message: " ++ msg)
: ("Path: " ++ fp)
: ("Headers: " ++ show (requestHeaders req))
: map (\(k, v) -> concat [ "Env: "
, k, " = ", v
]) env