#!/bin/sh . ./martin.sh get "/" root; root () { header "Content-Type" "text/html; charset=utf-8" cat < hello world from $PATH_INFO

hello world from $PATH_INFO

processes redirect EOT } get "/ps" ps_handler; ps_handler () { header "Content-Type" "text/plain" ps } get "/DeanMartin.jpg" dean_handler; dean_handler () { header "Content-Type" "image/jpeg" cat "DeanMartin.jpg" } get "/redirect" redirect_handler; redirect_handler () { status 302 header "Location" "http://jackjs.org/" } martin $PORT