npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lowdep/wait-port

v1.0.0

Published

Wait until a port, URL, or file is available before continuing — cross-platform CI/script utility, zero dependencies

Readme

wait-port

Zero dependencies Node License: MIT Platform

Wait until a port, URL, or file becomes available — then exit. Cross-platform, zero dependencies.

The classic "wait for the database/server to be ready before running tests" utility. Works in CI, Docker entrypoints, and package.json scripts.

Unlike wait-on / wait-port (npm, with dependencies) or until nc -z (Unix-only), this is a single zero-dep Node.js file.


Install

npm install -g wait-port

Or without installing:

npx wait-port 5432

Usage

wait-port 5432                          # Wait for TCP localhost:5432
wait-port localhost:3000 -t 60000       # Wait up to 60s
wait-port http://localhost:8080/health  # Wait for a healthy HTTP endpoint
wait-port 3000 5432 6379                # Wait for ALL three
wait-port file:./build/done             # Wait for a file to appear
wait-port 3000 --reverse                # Wait until port 3000 is FREED

Gate a command on readiness:

wait-port db:5432 && npm test

Target Formats

| Target | Meaning | |---|---| | 3000 | TCP localhost:3000 | | localhost:5432 | TCP host:port | | db:5432 | TCP host:port | | http://host/health | HTTP — ready when status < 400 | | https://host | HTTPS | | file:./path | File existence |


Example Output

wait-port  waiting for localhost:5432 to be ready...
  ✓ localhost:5432 ready  (2.4s)

Multiple targets:

wait-port  waiting for localhost:3000, localhost:5432, localhost:6379 to be ready...
  ✓ all 3 targets ready  (5.1s)

Timeout:

wait-port  waiting for localhost:9999 to be ready...
  ✗ Timed out after 30s — still not ready: localhost:9999

Options

| Flag | Default | Description | |---|---|---| | -t, --timeout <ms> | 30000 | Give up after this long (0 = wait forever) | | -i, --interval <ms> | 500 | Poll interval | | --probe-timeout <ms> | 2000 | Per-attempt connection timeout | | -r, --reverse | off | Wait until the target is gone instead of available | | -q, --quiet | off | No output, just the exit code |


Exit Codes

  • 0 — all targets became available (or freed, with --reverse)
  • 1 — timed out
  • 2 — invalid target

CI Example

- name: Start services
  run: docker compose up -d
- name: Wait for Postgres + Redis
  run: npx wait-port localhost:5432 localhost:6379 -t 60000
- name: Run tests
  run: npm test

License

MIT


Keywords

wait for port · wait-on alternative · wait for server · healthcheck · ci wait · wait for service · tcp wait · docker entrypoint · cross-platform · zero dependencies


Built to solve, shared to help — Rushabh Shah 🛠️✨

One of 40+ zero-dependency developer CLI tools — no node_modules, ever.