-- <<<- ------------------------------------------------------------------------ fileIn theScriptDir name: "webmod.sx" debugInfo: false ------------------------------------------------------------------------ module WebImplementation uses Web uses ScriptX end in module WebImplementation ------------------------------------------------------------------------ global theWebServer := undefined global WebServer ( local tempDir := theScriptDir local mod := getModule @WebImplementation forEach #( "webspin.sx", "norml.sx", "imap.sx", "webserve.sx" ) (fileName xxx -> print ("Loading " + fileName + " ...") fileIn theScriptDir \ name: fileName \ module: mod \ debugInfo: false ) ok theWebServer := new WebServer local dir := spawn theScriptDir "services" for file in (getContents dir) do ( print ("Loading service " + file + " ...") guard ( fileIn dir \ name: file \ module: mod \ debugInfo: false ) catching all barf: (caught barf) end ) theScriptDir := tempDir local lc := new LibraryContainer \ dir: theScriptDir \ path: "webserve.sxl" \ targetCollection: #(:) lc.name := "Web" lc[@Web] := (getModule @Web) lc[@WebImplementation] := (getModule @WebImplementation) lc.startupAction := fileIn "(self -> for i in self do load i )" module: (getModule @Web) close lc ) ------------------------------------------------------------------------ -- >>>