Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrobinson committed Mar 31, 2017
1 parent dede732 commit 9d614c3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -10,6 +10,20 @@ a (sort of) sinatra-like web application framework for bash (yes, bash), with a

define handlers like this:

get "/" index; index () {
header "Content-Type" "text/html"
cat <<EOT
<html>
<head>
<title>hello world</title>
</head>
<body>
PATH_INFO=$PATH_INFO
</body>
</html>
EOT
}

get "/redirect" redirect_handler; redirect_handler () {
status 302
header "Location" "http://jackjs.org/"
Expand Down

0 comments on commit 9d614c3

Please sign in to comment.