2024-07-12 00:30:26 -04:00
|
|
|
{
|
2024-07-12 22:15:00 -04:00
|
|
|
(* get the request info *)
|
|
|
|
argv shatter
|
|
|
|
|
|
|
|
(* check to see if we have the root route, if so return index.html *)
|
|
|
|
dup "/" streq?
|
|
|
|
choose
|
|
|
|
{ exch pop "index.html" exch } ifyes
|
|
|
|
{ "." exch strtie } ifno
|
|
|
|
|
|
|
|
(* now read the requested file and return it *)
|
|
|
|
readall disp
|
2024-07-12 00:30:26 -04:00
|
|
|
} ":3333" servehttp
|