This might just be a warning ? If that’s the case, the app is running fine.
The “command pipe” is used to send commands to the running server, which is probably not useful for simple apps but unfortunately is not an option.
Here’s what works for me:
After further inspection, I guess indeed the app ran fine.
Opening http://localhost:8080 on browser gave you “Error: Not Found”. Perhaps mis-configuration.?
Then I changed the a code a bit (inspired by this):
let _ =
Ocsigen_server.start
[ Ocsigen_server.host [Staticmod.run ~dir:"/Users/andretampubolon/blah/" ()]]
/Users/andretampubolon/blah/ only contains 2 text files. It still gives you “Error: Not Found”. Should it give you a directory listing, instead?
“Error: Not Found” is what I expect from Staticmod.run, so everything seems to work. You should be able to create a file named index.html in that directory.
Staticmod.run doesn’t seem to have an option to enable directory listing but it seems that you could perhaps add (Extendconfiguration.listdirs true); to the list passed to Ocsigen_server.host. I haven’t tested this.
Regarding the command pipe error, one can avoid it by making sure the directory that’s supposed to contain the named pipe exists (that’s the origin of the error). So in this case it would have removed the message to run: