0.0.3 • Published 4 years ago

close-server v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

close-server

Promisified net.Server.close()

Usage

Install it:

npm install close-server
yarn add close-server

Pass a net.Server (such as http.Server) to close-server and it will return a Promise which closes the server.

import http from 'http';
import closeServer from 'close-server';

const srv = http.createServer();
srv.listen()
...

await closeServer(srv)

Authors

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago