binder-project / binder

reproducible executable environments
http://mybinder.readthedocs.io
443 stars 38 forks source link

Rest API for requesting notebook servers #93

Open SylvainCorlay opened 7 years ago

SylvainCorlay commented 7 years ago

@rgbkrk @freeman-lab It would be very interesting to use mybinder as a notebook server provider for other front-ends that require a Jupyter back ends.

One use case I am working on is deploying small applications that depend on Jupyter widgets. A quick working example using tmpnb with a couple of sliders is available here:

http://perso.crans.org/corlay/web5/

It makes use of tmpnb's rest api for spawning kernels... With mybinder, this would be even more interesting since I could make use of custom kernel-side dependencies...

My current experiments give me the following CORS error

XMLHttpRequest cannot load http://mybinder.org/api/deploy/jovyan-pythreejs. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

Would you consider a PR enabling the configuration of CORS for a given binder?