# level-static

> use leveldb as a static file server

Latest version **1.1.0** (published 2013-07-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install level-static
pnpm add level-static
yarn add level-static
bun add level-static
```

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2013-07-18 |
| First published | 2013-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Dominic Tarr |
| Maintainers | dominictarr |

## Links

- npm: https://www.npmjs.com/package/level-static
- Repository: https://github.com/dominictarr/level-static
- Issues: https://github.com/dominictarr/level-static/issues
- npm.io page: https://npm.io/package/level-static

## Dependencies (3)

- [mime](https://npm.io/package/mime.md) git://github.com/dominictarr/node-mime.git
- [pull-stream](https://npm.io/package/pull-stream.md) ~2.20.0
- [stream-to-pull-stream](https://npm.io/package/stream-to-pull-stream.md) ~1.2.1

## Recent versions

- 1.1.0 (latest) — 2013-07-18
- 1.0.10 — 2013-07-11
- 1.0.9 — 2013-06-17
- 1.0.8 — 2013-06-12
- 1.0.7 — 2013-05-30
- 1.0.6 — 2013-05-21
- 1.0.5 — 2013-05-17
- 1.0.4 — 2013-05-17
- 1.0.3 — 2013-05-17
- 1.0.2 — 2013-05-16
- 1.0.1 — 2013-05-03
- 1.0.0 — 2013-05-03

## README

# level-static

use leveldb as a static file server.

``` js
var static  = require('level-static')
var http    = require('http')
var levelup = require('levelup')

var db = levelup('/tmp/level-static')

http.createServer(static(db)).listen(8000)
```

Will serve `index.html` if you give a path that ends in a `/`.

sets mime type and content length.

Of course, can also be used with
[sublevel](https://github.com/dominictarr/level-sublevel)

and as an express middleware.

## License

MIT

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