It seems that when I add use addurl with a folderitem, it only takes the index file. What is the best aprouch to load ALL of the files with this class? Should I just loop through the folders and/or files (depending on what will work) and call the AddURL function every time a file/folder goes through the loop.
if f <> nil then
if f.exists then
if Socket = nil then
Socket = new MyHTTPServerSocket
end if
Socket.AddURL("/", f)
Socket.Port = 8080
Socket.Listen
//open game page in webbrowser
ShowURL("http://127.0.0.1:8080/")
'ShowURL("http://localhost")
end if
end if
It seems to load the index but it does not seem to load subdirectories. Applying the same folder and copying it into the WAMP server ‘www’ directory works fine. Is there anything that you see is wrong at a glance.
I’d suggest following along in the debugger to make sure what you expect to happen is actually happening. After the AddURL, the Socket.URLs property will contain all the mapped urls.