Hacker News new | ask | show | jobs
by splatcollision 5083 days ago
The thing I like the best is the live preview URLs, especially across devices. I caught one of your live demos of this recently, and was blown away.

What's the library/service you're using to do this? I recall finding a reference in the JSBin source, but please remind us. I would love to get live previewing working in my web design web application, Edit Room, which also has shareable review links. (link in profile).

1 comments

It's called "the spike", but it's nothing more than EventSource triggering an event to refresh or inject.

The client code (for both remote rendering & codecasting): https://github.com/remy/jsbin/blob/master/public/js/spike.js

The server side: https://github.com/remy/jsbin/blob/master/lib/spike/index.js

Very simple, but requires an event based server - so Node was the obvious choice for JS Bin.

Thanks! Will check it out.