# safe-http-close

> Close an http server even if it isn't running

Latest version **1.0.1** (published 2015-05-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install safe-http-close
pnpm add safe-http-close
yarn add safe-http-close
bun add safe-http-close
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-05-12 |
| First published | 2015-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mike Atkins |
| Maintainers | lanetix |
| Keywords | http, close, safe |

## Links

- npm: https://www.npmjs.com/package/safe-http-close
- Repository: https://github.com/lanetix/node-safe-http-close
- Homepage: https://github.com/lanetix/node-safe-http-close#readme
- Issues: https://github.com/lanetix/node-safe-http-close/issues
- npm.io page: https://npm.io/package/safe-http-close

## Dependencies (1)

- [curry](https://npm.io/package/curry.md) ^1.2.0

## Recent versions

- 1.0.1 (latest) — 2015-05-12
- 1.0.0 — 2015-05-12

## README

safe-http-close
====================
`httpServer.close` will (throw in node < 0.12) callback with an error if the
server is still running. This is not what you want if you're just cleaning up
connections as part of your server's shutdown procedure. This libary provides
a function for you to safely close your server

Installation
------------

```bash
npm install safe-http-close
```

Usage
-----

Instead of calling `httpServer.close`, do

```javascript
var safeClose = require('safe-http-close');

safeClose(server, function (err) {
  if (!err) { console.log('closed'); }
});
```

---
_Source: https://npm.io/package/safe-http-close · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
