We share a similar vision at Tonic that code snippets should be completely runnable. With Tonic embeds ( https://tonicdev.com/embed ) your code is automatically connected to every version of every one of the 300,000 library on npm (just require("library") or require("library@version"), its already pre-installed). Additionally, the code is run in an actual container, so you can use filesystem examples, spin up a web server, whatever you'd like:
1. Example that spins up an express server in the example you can actually hit: http://blog.tonicdev.com/2016/03/09/snapshots.html
2. A blog post I wrote about hacking JSX with many runnable examples: http://tolmasky.com/2016/03/24/generalizing-jsx/
3. Node's fs docs with the examples converted to embed: http://capicue.com/fs.html