GitShow/sindresorhus/wait-for-localhost
sindresorhus

wait-for-localhost

Wait for localhost to be ready

by sindresorhus
delaylocalhostnodejsnpm-packageserverwait
Star on GitHubForknpm

JavaScript

279 stars12 forks10 contributorsQuiet · 3mo agoSince 2018v5.0.2MIT

Meet the team

See all 10 on GitHub →
sindresorhus
sindresorhus29 contributions
BendingBender
BendingBender3 contributions
bndnsmth
bndnsmth1 contribution
fehmer
fehmer1 contribution
chrisguttandin
chrisguttandin1 contribution
danez
danez1 contribution
Richienb
Richienb1 contribution
SamVerschueren
SamVerschueren1 contribution

Languages

View on GitHub →
JavaScript95.5%
TypeScript4.5%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
71
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
chrisguttandin
Alternate HTTP1 and HTTP2 attemptsMergedPR

Right now runs a fixed number (6) of attempts over HTTP1 before switching to HTTP2. This causes it to fail to wait for an HTTP1 server which takes a little longer to be up and running. I think it would be better to alternate between HTTP1 and HTTP2 up until the server is running. Since the change is very simple I went ahead and turned it into a PR. Please feel free to edit or reject it if you think this doesn't make sense.

chrisguttandin · 3mo ago
SimonSiefke
fix: endless loopMergedPR

fixes #19 This removes all event listeners on cleanup, so that the cleanup function is called once at most and no endless loop can occur.

SimonSiefke · 10mo ago
SimonSiefke
Endless loop on errorClosedIssue

I was confused for a bit why the program was hanging, but eventually profiling with vscode showed an endless loop in wait-for-localhost. Specifically, when the http2 client encounters an error like: then calls the function which calls , which results in the same error again which then calls the function again, and so on...

SimonSiefke · 10mo ago
Structured data for AI agents

Repository: sindresorhus/wait-for-localhost. Description: Wait for localhost to be ready Stars: 279, Forks: 12. Primary language: JavaScript. Languages: JavaScript (95.5%), TypeScript (4.5%). License: MIT. Topics: delay, localhost, nodejs, npm-package, server, wait. Latest release: v5.0.2 (3mo ago). Open PRs: 0, open issues: 0. Last activity: 3mo ago. Community health: 71%. Top contributors: sindresorhus, BendingBender, bndnsmth, fehmer, chrisguttandin, danez, Richienb, SamVerschueren, SimonSiefke, vlad-zhukov.

·@ofershap

Replace github.com with gitshow.dev