Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
wait-for-localhost
Advanced tools
Wait for localhost to be ready
Useful if you need a local server to be ready to accept requests before doing other things.
$ npm install --global wait-for-localhost
const waitForLocalhost = require('wait-for-localhost');
(async () => {
await waitForLocalhost({port: 8080});
console.log('Server is ready');
})();
Returns a Promise
that settles when localhost is ready.
Type: Object
Type: number
Default: 80
Type: string
Default: '/'
Use a custom path.
For example, /health
for a health-check endpoint.
Type: boolean
Default: false
Use the GET
HTTP-method instead of HEAD
to check if the server is running.
MIT © Sindre Sorhus
FAQs
Wait for localhost to be ready
The npm package wait-for-localhost receives a total of 2,417 weekly downloads. As such, wait-for-localhost popularity was classified as popular.
We found that wait-for-localhost demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.