Mercurial > repos > rhope
diff basicweb.rhope @ 0:76568becd6d6
Rhope Alpha 2a source import
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 28 Apr 2009 23:06:07 +0000 |
parents | |
children | 6202b866d72c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/basicweb.rhope Tue Apr 28 23:06:07 2009 +0000 @@ -0,0 +1,16 @@ +/* + Uses the webserver library to serve static files from the current directory +*/ + +//Import the library that does all the hard work +Import webserver.rhope + +Main[] +{ + Print["Starting webserver"] + //Since we're just serving static files we don't need to setup any handlers + handlers <- New@Dictionary[] + //Start listening on port 80 + Listen on Port[80,["Connection Start"]Set Input[1, handlers]] + Wait Forever[] +}