# send-promised

> Handy promise wrapper around the send static file server

Latest version **1.2.0** (published 2017-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install send-promised
pnpm add send-promised
yarn add send-promised
bun add send-promised
```

## 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.2.0 |
| Published | 2017-07-21 |
| First published | 2017-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | juliangruber |

## Links

- npm: https://www.npmjs.com/package/send-promised
- Repository: https://github.com/juliangruber/send-promised
- Homepage: https://github.com/juliangruber/send-promised#readme
- Issues: https://github.com/juliangruber/send-promised/issues
- npm.io page: https://npm.io/package/send-promised

## Dependencies (1)

- [send](https://npm.io/package/send.md) ^0.15.3

## Recent versions

- 1.2.0 (latest) — 2017-07-21
- 1.1.0 — 2017-07-18
- 1.0.2 — 2017-07-17
- 1.0.1 — 2017-07-12
- 1.0.0 — 2017-07-12

## README

# send-promised

[![development sponsored by voltra.co](https://img.shields.io/badge/Development%20sponsored%20by-Voltra.co-yellow.svg)](https://voltra.co/)

Handy promise wrapper for the [send](https://www.npmjs.com/package/send) static file server.

## Usage

`send-promised` returns whether a request could be handled by static file serving, so you can
use it as the first part of your http handler function.

```js
const send = require('send-promised')
const http = require('http')

const serve = (req, res) =>
  send({
    root: `${__dirname}/static` // and other options for `send`
  })

http.createServer(async (req, res) => {
  const served = await serve(req, res)
  if (served) return

  // handle other routes
})
```

## Installation

```bash
$ npm install send-promised
```

## License

MIT

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