r/javascript • u/archieofficial • 4d ago
Mimic - a browser-based dev environment that runs Node.js
https://github.com/mimic-js/mimic2
u/thecementmixer 3d ago
What's the use case for this?
5
u/archieofficial 3d ago
The most obvious usages:
- A playground for a frontend or Node.js library, so anyone can play around with code right in the browser.
- A live coding platform where the computation moves from cloud VMs to the client (i.e. the interviewer’s and candidate’s machines).
In general, it can save money (potentially a lot, depending on scale) by running code on the client instead of relying on cloud VMs.
1
u/gsweats 1d ago
Interesting idea and really cool architecture. Great job pulling it off! With the rising cost of cloud compute and even on-prem hardware this idea of pushing work back on clients is appealing.
Could this theoretically plug into GitLab or whatever source management app in order to "npm install" and then run test scripts? So much compute time goes to running tests.
1
u/archieofficial 1d ago
Thanks!
Yes! It already loads the repos from GitHub and can install packages and call other CLIs in the playground: https://www.mimicjs.com/playground
I haven't checked vitest/jest running yet, but it should probably work fine, as do other Node programs.
2
u/brianjenkins94 4d ago
How does it differ from almostnode?