TO init Make fs filesystem("fla") Make eth Ethernet(nil, "vm2server") END TO main Repeat 4 Start server ; start four server tasks END TO server LOCAL http := New HTTPServer(fs) LOCAL path := New string(100) FOREVER [ http.get(path) ; if you need to process requests not matching an existing filename, ; the code to do so is inserted here. ; This example lists directories when uncommented ; if fs.find(path) = 2 ; ServeDirectory(http, "VM2 test", path) http.Flush ] END ; Optional code to list directories To ServeDirectory(http, title, dir) http.printf("%s: %s\n", title, dir) http.printf("

Directory of %s: %s

", title, dir)
	print to http, fs:dir:"%z %Y-%m-%d %h:%M:%s %b %n"
") End