finds.dev← search

// the find

jeffbski/wait-on

★ 1,980 · JavaScript · MIT · updated Sep 2026

wait-on is a cross-platform command line utility and Node.js API which will wait for files, ports, sockets, and http(s) resources to become available

wait-on is a small cross-platform CLI and Node.js library that blocks until files, ports, sockets, or http(s) endpoints become available (or, in reverse mode, until they go away). It's aimed at CI pipelines and dev scripts that need to sequence steps — e.g. wait for a dev server to boot before running e2e tests.

One consistent resource-prefix syntax (file:, tcp:, socket:, http(s):, http(s)-get:, command:) covers most 'wait for X' cases instead of scripting separate curl/nc loops. File waiting uses a stabilization window (checks size stops changing) rather than just existence, which avoids racing a build that's still writing its output. Distinguishing http: (HEAD) from http-get: (GET) is a genuinely useful detail for servers that 404/405 on HEAD. --status-codes / validateStatus lets success criteria go beyond the default 2XX, which matters for health-check endpoints that intentionally answer 404.

Default timeout is Infinity — forget the -t flag and a CI job can hang forever waiting on a resource that never comes up, rather than failing loud. tcpTimeout defaults to a tight 300ms per connect attempt, which can produce false negatives on slower or loaded CI runners. The localhost IPv6/IPv4 resolution gotcha is real enough to need its own README section — pre-Node 20 users can see a service reported as unavailable simply because localhost resolved to ::1 while the service bound to 127.0.0.1. Proxy behavior is inherited from axios's env-var detection, so corporate-proxy setups are a known class of 'wait-on just hangs' issues unless you explicitly pass proxy: false.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →