4 ms·
Show HN: Nodebook – Minimalist Node REPL with Web UI
- romanovcode 8y agoI don't see the point if it is required by browser. Another minimalist JS REPL powered by Chrome: Ctrl + Shift + J (Windows / Linux) or Cmd + Opt + J (Mac).
- netgusto 8y agoI made this to help with my brushing up for coding interviews. I needed something like coderpad.io (that many companies use as a remote interview tool anyway) but free, and that I could use on local files to keep everything in a git repo. Advantages that I see over the browser console you're suggesting: * file persistence in a git repo * uses an actual node instance * capacity to use npm packages * disposable environments for every execution (docker or node) so that your code is not polluted by previous runs
- deleted 8y ago[deleted]
- skibz 8y agoVery nice. This reminds me of RunKit [1], which some of you may remember as TonicDev. 1: https://runkit.com https://runkit.com
- emehrkay 8y agoI might fork this and add other Lang support. I like the minimal `write to a file, eval, and display` approach. The execNotebook function would need modifications
- netgusto 8y agoYes. Would probably require --docker and some predefined "run recipes" to handle properly different languages, but seems very achievable.
- emehrkay 8y agoA proper shebang would work for *nix users (and maybe Windows users as well). I’d imagine a drop down next to the run button that would list the available languages on the system. The code would need to check for the languages at startup time and store a simple “lang.verson” => “/path/to/exe” map. And then somehow use that when evaluating the code. This is a cool little project that you have going.
- ZitchDog 8y agoThis may be obvious, but do not under any circumstances run this application on a public port! Any user will have complete access to your machine.
- netgusto 8y agoYes. By default, without --bindaddress specified, the server binds to 127.0.0.1 I'll add this warning to readme. Thanks.
- jhomedall 8y agoI'm not seeing any CSRF tokens (but I don't generally work with node, so correct me if I'm wrong). If your POST endpoints accept application/x-www-form-urlencoded or multipart/form-data, you will definitely want to add this. If you don't, it becomes trivial to rig up a website that will use your browser to trigger a POST to your internal endpoints.
- gitgud 8y agoIs this any better than the NodeJS kernel for Jupytr Notebooks? https://github.com/notablemind/jupyter-nodejs https://github.com/notablemind/jupyter-nodejs