Show HN: NodeBook – Node.js Notebooks

7 hours ago 1

A Jupyter-like notebook application for Node.js with a clean, minimalistic interface.

  • Cell-based code execution - Write and execute Node.js code in individual cells
  • Real-time output streaming - See console output as code executes
  • Notebook management - Create, save, and organize multiple notebooks
  • Professional UI - Clean, minimalistic interface inspired by Jupyter
  • WebSocket support - Real-time updates across multiple clients
# Install dependencies npm install cd client && npm install && cd ..
# Start both server and client in development mode npm run dev

The application will be available at:

# Build the client npm run build # Start the server npm start
  1. Create a Notebook - Click "New Notebook" and give it a name
  2. Add Cells - Click the + button to add code cells
  3. Write Code - Type Node.js code in the cells
  4. Execute - Click the play button to run a cell
  5. Save - Changes are saved when you click the save button
  • Backend: Express.js server with WebSocket support for real-time updates
  • Frontend: React with CodeMirror for code editing
  • Execution: Uses vm2 for safe code execution with timeout support
  • Storage: Notebooks are stored as JSON files in the notebooks directory

This application uses vm2 for code execution which provides sandboxing, but should not be exposed to untrusted users without additional security measures.

Read Entire Article