packages feed

wai-cli 0.1.0 → 0.1.1

raw patch · 3 files changed

+9/−7 lines, 3 files

Files

README.md view
@@ -11,7 +11,7 @@ - `--devlogging` development logging (from `wai-extra`) - printing a pretty and colorful run message (e.g. `Running on http port 3000 with 4 CPUs`) (you can replace it with your own, or with nothing) -Extracted from [sweetroll](https://github.com/myfreeweb/sweetroll) / [wai-cli](https://github.com/myfreeweb/wai-cli)'s demo web app.+Extracted from [sweetroll](https://github.com/myfreeweb/sweetroll) and [microformats2-parser](https://github.com/myfreeweb/microformats2-parser)'s demo web app.  ## Usage @@ -32,7 +32,9 @@ ```  Want to use command line args for your application-specific settings? Don't.-Use environment variables instead. (Possibly with [dotenv](https://github.com/stackbuilders/dotenv-hs) to load some of them from a file.)+Use environment variables instead.+Possibly with [dotenv](https://github.com/stackbuilders/dotenv-hs) to load some of them from a file.+[envy](https://www.stackage.org/package/envy) is a really awesome way to read them.  ## License 
library/Network/Wai/Cli.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE CPP, OverloadedStrings, UnicodeSyntax #-} -module Network.Wai.Cli (module Network.Wai.Cli) where+module Network.Wai.Cli where  import           Network.Wai (responseLBS, Application) import qualified Network.Wai.Handler.CGI as CGI@@ -109,12 +109,12 @@  defPutListening ∷ WaiOptions → IO () defPutListening opts = getNumCapabilities >>= putMain-  where putMain cpus = reset "Running on " >> blue (protocol opts) >> putProto >> reset " with " >> green (show cpus ++ " CPUs") >> putStrLn ""+  where putMain cpus = reset "Running on " >> blue (protocol opts) >> putProto >> reset " with " >> green (show cpus ++ " CPUs") >> setReset >> putStrLn ""         putProto = case protocol opts of                      "http" → reset " port "   >> boldMagenta (show $ port opts)                      "unix" → reset " socket " >> boldMagenta (show $ socket opts)                      "activate" → reset " activated socket"-#ifdef SweetrollTLS+#ifdef WaiCliTLS                      "http+tls" → reset " (TLS) port "   >> boldMagenta (show $ port opts)                      "unix+tls" → reset " (TLS) socket " >> boldMagenta (show $ socket opts)                      "activate+tls" → reset " (TLS) activated socket"
wai-cli.cabal view
@@ -1,5 +1,5 @@ name:            wai-cli-version:         0.1.0+version:         0.1.1 synopsis:        Command line runner for Wai apps (using Warp) with TLS, CGI, socket activation & graceful shutdown description:     Command line runner for Wai apps (using Warp) with support for UNIX domain sockets,@@ -18,7 +18,7 @@ extra-source-files:     README.md tested-with:-    GHC == 8.0.1+    GHC == 8.0.2     GHC == 7.10.3  source-repository head