function setup
setup(config: Config): HTTPServer

Creates and returns an HTTPServer with routes for the test HTML, filtered test page, and static assets, plus a WebSocket handler that streams TAP events.

import * as WebServer from './web-server.ts';

import type { Config } from '../types.ts';
import { bindServerToPort } from './bind-server-to-port.ts';

// Defined, not invoked: wires live run state into routes and WS handlers.
function example(config: Config) {
  const server = WebServer.setup(config); // routes ready, not yet listening
  return bindServerToPort(server, config); // bind, then navigate the page to '/'
}

Parameters

config: Config

Return Type

Usage

import { setup } from "lib/setup/web-server.ts";