Installations
npm install why-is-node-running-tbodt
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=8
Score
67.6
Supply Chain
96.3
Quality
74.8
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
tbodt
Download Statistics
Total Downloads
522
Last Day
1
Last Week
2
Last Month
3
Last Year
55
GitHub Statistics
31 Commits
2 Watching
3 Branches
1 Contributors
Bundle Size
1.74 kB
Minified
866.00 B
Minified + Gzipped
Package Meta Information
Latest Version
2.0.2
Package Id
why-is-node-running-tbodt@2.0.2
Unpacked Size
10.23 kB
Size
3.74 kB
File Count
10
Total Downloads
Cumulative downloads
Total Downloads
522
Last day
0%
1
Compared to previous day
Last week
0%
2
Compared to previous week
Last month
-25%
3
Compared to previous month
Last year
-28.6%
55
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
why-is-node-running
This package is a fork by tbodt with a couple of extra features. You probably shouldn't be using it.
Node is running but you don't know why? why-is-node-running
is here to help you.
Installation
Node 8 and above:
1npm i why-is-node-running -g
Earlier Node versions (no longer supported):
1npm i why-is-node-running@v1.x -g
Usage
1const log = require('why-is-node-running') // should be your first require 2const net = require('net') 3 4function createServer () { 5 const server = net.createServer() 6 setInterval(function () {}, 1000) 7 server.listen(0) 8} 9 10createServer() 11createServer() 12 13setTimeout(function () { 14 log() // logs out active handles that are keeping node running 15}, 100)
Save the file as example.js
, then execute:
1node ./example.js
Here's the output:
There are 5 handle(s) keeping the process running
# Timeout
/home/maf/dev/node_modules/why-is-node-running/example.js:6 - setInterval(function () {}, 1000)
/home/maf/dev/node_modules/why-is-node-running/example.js:10 - createServer()
# TCPSERVERWRAP
/home/maf/dev/node_modules/why-is-node-running/example.js:7 - server.listen(0)
/home/maf/dev/node_modules/why-is-node-running/example.js:10 - createServer()
# Timeout
/home/maf/dev/node_modules/why-is-node-running/example.js:6 - setInterval(function () {}, 1000)
/home/maf/dev/node_modules/why-is-node-running/example.js:11 - createServer()
# TCPSERVERWRAP
/home/maf/dev/node_modules/why-is-node-running/example.js:7 - server.listen(0)
/home/maf/dev/node_modules/why-is-node-running/example.js:11 - createServer()
# Timeout
/home/maf/dev/node_modules/why-is-node-running/example.js:13 - setTimeout(function () {
CLI
You can also run why-is-node-running
as a standalone if you don't want to include it inside your code. Sending SIGUSR1
signal to the process will produce the log.
1why-is-node-running /path/to/some/file.js
probing module /path/to/some/file.js
kill -SIGUSR1 31115 for logging
To trigger the log:
kill -SIGUSR1 31115
License
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More