view basicweb.rhope @ 186:ba35ab624ec2

Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
author Mike Pavone <pavone@retrodev.com>
date Fri, 07 Oct 2011 00:10:02 -0700
parents f3686f60985d
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[] }
}