wait-for-port
TL;DR
Provides a bootstrap for waiting for a port to be available.
Installation
- npm
- yarn
npm add -D @codeceptjs-bootstraps/wait-for-port
yarn add -D @codeceptjs-bootstraps/wait-for-port
Basic usage
const { waitForPortBootstrap } = require('@codeceptjs-bootstraps/wait-for-port')
exports.config = {
...waitForPortBootstrap({
port: 3001, // port to wait for
})
}
Configuration
interface WaitForPortOptionsType {
port: number;
host?: string; // Defaults to 'localhost'
interval?: number; // Defaults to 1000ms (1 second)
timeout?: number; // Defaults to 60 * 1000ms (1 minute)
}