Piping2 is a hot-reload utility for Node.js that automatically restarts your application when files change, without requiring a wrapper binary. Version 0.4.1 is the latest stable release. Unlike nodemon or node-supervisor, it uses the cluster API to spawn your app in a worker process, enabling clean restarts without external daemons. It supports transpiler integration (e.g., Babel), file watching via chokidar, and optional require hook for selective monitoring. This package is considered unstable and intended for development only. Note that piping2 is a fork of the original piping package, with no active maintenance.
npm install piping2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage: require piping2, pass configuration, and only run app logic when piping returns true (worker process).
Consider switching to nodemon or supervisor for production stability.
Always wrap application logic in an `if (piping()) { ... }` block or guard with `return`.Set `hook: true` to only watch required files, but note that files required before piping() are not tracked.
Pin chokidar version in your project's package.json if issues arise.
Use `const piping = require('piping2')`Wrap your app code with `if (!require('piping2')()) { return; }`Ensure the 'main' option points to an existing file, e.g., `./server.js`