I am connecting locally run Snap! to http://localhost:8888/ via URL block and the block always returns a null string after a wait.
I'm new to Snap! but a software engineer. I'm writing the server end as well.
I am seeing similar behavior from the apache server running on localhost on 80
You can do it servin CORS header from your server, but if you are in localhost you can do other things.
To be in the same domain, you must load your Snap! from a webserver (not file://). And same domain really means same domain and same port. So, if your test is in localhost:8888, then your Snap! must also be inside 8888.
You also can use a proxy, and then, using official Snap! i possible.
And also, you can use some "Snap! distros" like Snap4Arduino, to avoid this cors problem.