view basicweb.rhope @ 147:f3686f60985d

Sort of working port of framework. Transaction bug seems to be getting in the way. Going to work around, but want the old version in the repo so I can test later.
author Mike Pavone <pavone@retrodev.com>
date Mon, 22 Nov 2010 01:15:02 -0500
parents 1f39e69446f9
children
line wrap: on
line source

/*
	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[args]
{
	[args]Index[1]
	{ port <- Int32[~] }
	{ port <- Val[80] }
	Print["Starting webserver"]
	//Since we're just serving static files we don't need to setup any handlers
	handlers <- Dictionary[]
	//Start listening on the desired port
	Listen on Port[port,Connection Start[?, ?, handlers]]
	{ Wait Forever[] }
}