Slim Demon
Slim Demon is a micro library that detects changes in the files of your NodeJS application and restart it quickly and automatically.
Description
Slim Demon is a micro library based on the native NodeJS API using the core and the native libraries.
You can define a directory and one or more types of files that will be listened to, if any of these files change the application will be restarted quickly and automatically.
How to work with this project
Install this module into your project.
npm i slim-demon --save-dev
Configure the demon
Include the demon configuration in your main package.json file.
| Property | Type | Description |
|---|---|---|
| rootDirectory | string | The main folder of your NodeJS Application. |
| extensionsFile | Array | File extensions to review. |
| mainApplication | string | Command to execute when a change is detected in the files. |
Example
"demon": {
"rootDirectory": "./src",
"extensionsFile": [
"js"
],
"mainApplication": "npm run start"
}
Add a custom script
Include the following sentence into your scripts of your packate.json file:
"scripts": {
"start:watch": "node node_modules/slim-demon"
}
Run
Run this command in your terminal.
$npm run start:watch
Code Scaffolding
/
βββ assets π # Images Sources.
βββ doc # QAC Documentation.
βββ example # Local example.
βββ src π¦ # Main file library.
βββ ...
οΈ Review and Update Sependencies
For review and update all npm dependencies of this project you need install in global npm package "npm-check-updates" npm module.
# Install and Run
$npm i -g npm-check-updates
$ncu
License
Happy Code
Created with JavaScript, lot of and a few