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("<html><head><title>%s: %s</title></head><body>\n", title, dir) http.PrintF("<h1>Directory of %s: %s</h1>\n<pre>", title, dir) Print To http, fs:dir:"%z %Y-%m-%d %h:%M:%s %b <a href=\"%p%n\">%n</a>" http.PrintF("</pre></body></html>") End