7 comments

[ 2400 ms ] story [ 1477 ms ] thread
Very cool in concept. It would be nice if it was really easy to package up and deliver apps done this way (without end users having to jump through weird hoops to allow it to run). They can be really tiny presumably since the web server does so little (i.e. it isn't running node or anything).

One thing that seems missing is the ability to fetch files from other domains (avoiding the cross origin issue). Can it somehow magically do this just using XMLHttpRequest?

Good idea. I'll add "fetch files from other domains" to the TODO list, as either it's own call, or maybe do something like allowing "http://" protocols in the SLFSRV.read() method.

cross-origin issues would probably prevent some xmlhttprequest calls directly. Meanwhile, here is one current hack you could use to read files from other domains (although it assumes that "curl" is installed):

SLFSRV.exec( { program:'curl', args:['curl','https://news.ycombinator.com/'] }, function(ret) { console.log(ret.stdout); } );

Sounds great. Yeah I had noticed that exec function might work. :)

I've downloaded the binary and am playing with it....holy crap I love this thing. It's perfect for some stuff I'm currently working on. I'm glad it is so simple, although I'm sure there are some things that could be added eventually to make it a bit better. (sandboxing and various other permissions things come to mind)