We clone a running VM in 2 seconds
Published on: 2025-04-29 20:55:27
At CodeSandbox we run your development project and turn it into a link you can share with anyone. People visiting this link can not only see your running code, they can click “fork” and get an exact copy of that environment within 2 seconds so they can easily contribute back. Give it a try with this example, or import your GitHub repo here!
So how can we spin up a cloned environment in 2 seconds? That's exactly what I'll be talking about here!
The challenge: spinning up a development environment in two seconds
We've been running sandboxes for a long time now, and the core premise has always been the same: instead of showing static code, it should be running. Not only that, you should be able to press fork and play with it whenever you want to.
In the past, we've enabled this experience by running all your code in your browser. Whenever you would look at a sandbox, you would execute the code. This was fast, because we had full control over how the code was bundled. Forks were fast:
... Read full article.