Skip to content

Commit

Permalink
Add bits of example bundle documentation.
Browse files Browse the repository at this point in the history
* Cleanup foo1_0 hello example.
  • Loading branch information
creichert committed Dec 19, 2014
1 parent 3d075f1 commit a95ae52
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
4 changes: 3 additions & 1 deletion incoming/Makefile
@@ -1,5 +1,7 @@
# Keter Configuration Examples
#
# See README.md for build details

# Build test bundles. See README.md

GHC?=ghc

Expand Down
10 changes: 10 additions & 0 deletions incoming/README.md
@@ -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
Expand All @@ -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.

18 changes: 8 additions & 10 deletions incoming/foo1_0/hello.hs
Expand Up @@ -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

0 comments on commit a95ae52

Please sign in to comment.