server-with-kill
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i server-with-kill

Weekly Downloads

303

Version

1.0.0

License

MIT

Unpacked Size

3.18 kB

Total Files

4

Last publish

Collaborators

  • kenneth-gray