Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek-nowicki committed May 6, 2022
1 parent 212c634 commit 3340240
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ npm install --save runtime-node-refresh

# Usage

Following you will find example of simple project created via `npm` which uses `runtime-node-refresh` to refresh environment variable without running the node script again. The message to update environment variable came from other node process.
Following you will find example of simple project created via `npm` which uses `runtime-node-refresh` to refresh environment variable without running the node script again. Notice that the message to update environment variable came from other node process.

Create `index.js` file and add the following code:

Expand All @@ -35,7 +35,7 @@ Create `package.json' file and fill it with the following:
"refresh": "runtime-node-refresh"
},
"dependencies": {
"runtime-node-refresh": "^1.0.3"
"runtime-node-refresh": "^1.0.6"
}
}
```
Expand All @@ -60,4 +60,7 @@ It may be very usefult when you want to restart/update environment variable on r
The real life example of `RnR` lib usage can be find in the following express based web-application:
https://github.com/przemek-nowicki/node-express-template.ts/blob/master/src/server.ts

Note: RnR is using node signals which means it does not work on Worker threads.
**Note:** RnR is using node signals which means it does not work on Worker threads.
It uses SIGPIPE signal to communicate between nodejs processes.
By default the SIGPIPE is ignored by NodeJS.
However it is recommend to check if you don't have a listener installed on SIGPIPE in your project before you use `rnr` library.
15 changes: 2 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "runtime-node-refresh",
"version": "1.0.5",
"version": "1.0.6",
"bin": "./bin/rnr.js",
"description": "Refresh node environment variables on runtime without restarting the node server.",
"main": "index.js",
Expand All @@ -15,6 +15,7 @@
"refresh envs",
"update env",
"runtime node refresh",
"change node envs",
"changing log level at runtime",
"update env",
"update node envs"
Expand Down

0 comments on commit 3340240

Please sign in to comment.