Watchit is a simple Node.js practice project that enables you to track changes in your Node.js JavaScript files. It's designed to automatically restart your Node.js application whenever changes are detected in the specified file. It also restarts the program when files are deleted.
watchit
is a command-line tool developed to showcase my JavaScript and NodeJS skills. It serves a similar purpose to nodemon
, providing an easy way to monitor file changes and streamline development.
To use watchit
, follow these steps:
-
Install the required npm packages:
npm install caporal chokidar lodash.debounce chalk
-
Clone the repository and install the project dependencies:
git clone https://github.com/your-username/watchit.git cd watchit npm install
-
Run
watchit
with the following command:watchit [test.js]
Replace
[filename]
with the name of the file you want to monitor. If no filename is provided, the default is set toindex.js
.
Before using watchit
, make sure you have the following npm packages installed:
Ensure that the fs
and child_process
modules from the Node.js API are also required in your project.
Clone the repository and install the required npm packages:
git clone https://github.com/your-username/watchit.git
cd watchit
npm install