# bahmutov/start-server-and-test

Starts server, waits for URL, then runs test command; when the tests end, shuts down server

Repository: https://github.com/bahmutov/start-server-and-test
Canonical: https://ross.abutalabs.com/products/start-server-and-test
Language: JavaScript
License: MIT
License Family: permissive
Topics: cli, utility, test, server, startup
Last push: 2026-08-17T07:18:59+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 95, longevity 100
- inputs: {"age_days": 3225, "days_push": 16, "days_rel": 32, "gap_med": 13.5, "n_releases_24m": 27}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1581, forks 96 (observed 2026-08-28T04:05:07.035592+00:00)

## What it is
A Node.js CLI utility that starts a server, waits for a given URL to respond, runs a test command, and then shuts the server down. It is designed to be used inside npm scripts to simplify end-to-end and integration test workflows.

## Use cases
- start a dev server and run e2e tests against it in CI
- wait for localhost to respond before running Cypress tests
- run mocha tests after an http-server starts on a port
- orchestrate server startup and teardown around a test command
- run integration tests in npm scripts without manual server management

## When to choose
- you need to start a server, wait for it to be ready, run tests, and shut it down automatically
- you use npm scripts and want a simple one-command CI test flow
- you run Cypress, Mocha, or similar tests against a local server

## When to avoid
- your test framework already has built-in server lifecycle management
- you need complex multi-service orchestration or parallel server startup
- you are not using Node.js/npm-based tooling

## Facets
- artifact type: cli-tool
- maturity: active
- function: testing, e2e-testing, cli, developer-tools
- domain: testing, developer-tools, web-development
- platform: cli, cross-platform
- tags: npm-scripts, ci, server-startup, wait-for-url, test-orchestration, command-line, nodejs

## Member repositories
- bahmutov/start-server-and-test (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:07.035592+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:56:32.717304+00:00, confidence not recorded.
  - readme: https://github.com/bahmutov/start-server-and-test (fetched 2026-08-28T04:05:07.035592+00:00, sha 1f90a8c84746)
- Data as of 2026-08-30T08:39:29.467469+00:00.
