Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
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 wait-for-localhost
import waitForLocalhost from 'wait-for-localhost';
await waitForLocalhost({port: 8080});
console.log('Server is ready');
Returns a Promise<object>
that settles when localhost is ready.
The object contains a ipVersion
property with a value of either 6
or 4
depending on the IP version that was used.
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.
Type: number[]
Default: [200]
HTTP status codes to consider as successful responses.
FAQs
Wait for localhost to be ready
The npm package wait-for-localhost receives a total of 1,745 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.