Toplevel: add a simple cohttp based server#111
Conversation
This provides the simplest possible support to enable topfind in the js_of_ocaml toplevel
Toplevel: add a simple cohttp based server
|
Could you explain a bit how this work (to someone not familiar with topfind)? My understanding is that the user willing to use topfind on a js_of_ocaml-using webpage should run the I'm wondering what the use-cases for this are; if I correctly understand that the user should run the server, it seems potentially useful but also much more limiting than classic js_of_ocaml (which doesn't require an OCaml installation). In any case, I'm also curious about the security implications of having a program running on my machine ready to upload any file from my filesystem. Is there a risk of attack from malicious javascript injected in this webpage or another? Is there a risk of attack from outside localhost? |
|
On Wed, Mar 19, 2014 at 4:26 PM, gasche notifications@github.com wrote:
Firstly this feature is primarily for the js_of_ocaml toplevel and not so It doesn't actually require ocamlfind; normal ocaml directives like #load I'm wondering what the use-cases for this are; if I correctly understand
It might perhaps find use with developers who want to test their libraries I don't think it changes any other use case of js_of_ocaml. In any case, I'm also curious about the security implications of having a
It should only serve files on 127.0.0.1:8888 so I don't think it's possible Files should only be accessible from $(HOME)/.opam but I note that you can -Andy
|
Get latest changes from js_of_ocaml
Provides just enough to enable topfind in the js_of_ocaml toplevel.
You may find this useful for testing dynamic loading with js_of_ocaml.
Note; xmlHttpRequests are generated regardless of the presence of a server that can support them which might not be the behaviour you want. You might also want support of command line options and serving multiple directories as this feature and also enables
open_into read arbitrary files from the filesystem.