Random example banner cleanup

This commit is contained in:
Connor Prussin 2018-09-03 12:23:58 -07:00
parent ce4a10a3b5
commit 775b06f004
No known key found for this signature in database
GPG Key ID: C72452E036D53A6A
4 changed files with 38 additions and 36 deletions

View File

@ -20,9 +20,9 @@ image = const $ FS.readFile filePath >>= HTTPure.ok' responseHeaders
-- | Boot up the server
main :: HTTPure.ServerM
main = HTTPure.serve 8080 image do
Console.log $ " ┌────────────────────────────────────────────"
Console.log $ " │ Server now up on port 8080 "
Console.log $ " "
Console.log $ " │ To test, run: "
Console.log $ " │ > curl -o circle.png localhost:8080 "
Console.log $ " └────────────────────────────────────────────"
Console.log $ " ┌──────────────────────────────────────"
Console.log $ " │ Server now up on port 8080 "
Console.log $ ""
Console.log $ " │ To test, run: "
Console.log $ " │ > curl -o circle.png localhost:8080 "
Console.log $ " └──────────────────────────────────────"

View File

@ -22,15 +22,15 @@ sayHello =
-- | Boot up the server
main :: HTTPure.ServerM
main = HTTPure.serve 8080 sayHello do
Console.log $ " ┌────────────────────────────────────────────"
Console.log $ " │ Server now up on port 8080 "
Console.log $ " "
Console.log $ " │ To test, run: "
Console.log $ " │ > curl -Nv localhost:8080 "
Console.log $ " │ # => ... "
Console.log $ " │ # => < Transfer-Encoding: chunked "
Console.log $ " │ # => ... "
Console.log $ " │ # => hello "
Console.log $ " │ (1 second pause) "
Console.log $ " │ # => world! "
Console.log $ " └────────────────────────────────────────────"
Console.log $ " ┌──────────────────────────────────────"
Console.log $ " │ Server now up on port 8080 "
Console.log $ ""
Console.log $ " │ To test, run: "
Console.log $ " │ > curl -Nv localhost:8080 "
Console.log $ " │ # => ... "
Console.log $ " │ # => < Transfer-Encoding: chunked "
Console.log $ " │ # => ... "
Console.log $ " │ # => hello "
Console.log $ " │ (1 second pause) "
Console.log $ " │ # => world! "
Console.log $ " └──────────────────────────────────────"

View File

@ -14,10 +14,12 @@ router _ = HTTPure.notFound
-- | Boot up the server
main :: HTTPure.ServerM
main = HTTPure.serve 8080 router do
Console.log $ " ┌───────────────────────────────────────────────┐"
Console.log $ " │ Server now up on port 8080 │"
Console.log $ " │ │"
Console.log $ " │ To test, run: │"
Console.log $ " │ > curl localhost:8080/hello # => hello │"
Console.log $ " │ > curl localhost:8080/goodbye # => goodbye │"
Console.log $ " └───────────────────────────────────────────────┘"
Console.log $ " ┌────────────────────────────────┐"
Console.log $ " │ Server now up on port 8080 │"
Console.log $ " │ │"
Console.log $ " │ To test, run: │"
Console.log $ " │ > curl localhost:8080/hello │"
Console.log $ " │ # => hello │"
Console.log $ " │ > curl localhost:8080/goodbye │"
Console.log $ " │ # => goodbye │"
Console.log $ " └────────────────────────────────┘"

View File

@ -16,14 +16,14 @@ router { query }
-- | Boot up the server
main :: HTTPure.ServerM
main = HTTPure.serve 8080 router do
Console.log $ " ┌───────────────────────────────────────"
Console.log $ " │ Server now up on port 8080 "
Console.log $ " "
Console.log $ " │ To test, run: "
Console.log $ " │ > curl localhost:8080?foo "
Console.log $ " │ # => foo "
Console.log $ " │ > curl localhost:8080?bar=test "
Console.log $ " │ # => bar "
Console.log $ " │ > curl localhost:8080?baz=<anything> "
Console.log $ " │ # => <anything> "
Console.log $ " └───────────────────────────────────────"
Console.log $ " ┌───────────────────────────────────────"
Console.log $ " │ Server now up on port 8080 "
Console.log $ ""
Console.log $ " │ To test, run: "
Console.log $ " │ > curl localhost:8080?foo "
Console.log $ " │ # => foo "
Console.log $ " │ > curl localhost:8080?bar=test "
Console.log $ " │ # => bar "
Console.log $ " │ > curl localhost:8080?baz=<anything> "
Console.log $ " │ # => <anything> "
Console.log $ " └───────────────────────────────────────"