Skip to content

Repository files navigation

Server With Kill

This package can wrap a node server so that it has an additional kill method, which destroys connections immediately.

Installation

npm install server-with-kill

Example usage

const express = require('express');
const { transform } = require('server-with-kill');

const app = express();

const server = transform(app.listen(3000));
server.kill();

See /example/index.ts for a more advanced use case.

About

Add kill method to http server

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages