# hangersteak

> Node static file web server

Latest version **0.2.12** (published 2022-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install hangersteak
pnpm add hangersteak
yarn add hangersteak
bun add hangersteak
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.12 |
| Published | 2022-02-06 |
| First published | 2019-03-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Vidar Eldøy |
| Maintainers | eldoy |
| Keywords | server, webserver, fast, minimal, node, http, https, ssl, secure, file-server, static, microservice |

## Links

- npm: https://www.npmjs.com/package/hangersteak
- Repository: https://github.com/eldoy/hangersteak
- Homepage: https://github.com/eldoy/hangersteak#readme
- Issues: https://github.com/eldoy/hangersteak/issues
- npm.io page: https://npm.io/package/hangersteak

## Dependencies (5)

- [vary](https://npm.io/package/vary.md) ^1.1.2
- [accepts](https://npm.io/package/accepts.md) ^1.3.8
- [rekvest](https://npm.io/package/rekvest.md) ^0.1.4
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.34
- [compressible](https://npm.io/package/compressible.md) ^2.0.18

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.2.12 (latest) — 2022-02-06
- 0.2.11 — 2022-02-06
- 0.2.10 — 2021-03-09
- 0.2.9 — 2021-03-09
- 0.2.8 — 2021-02-25
- 0.2.7 — 2021-02-24
- 0.2.6 — 2020-10-31
- 0.2.5 — 2020-08-30
- 0.2.4 — 2020-01-07
- 0.2.3 — 2020-01-07
- 0.2.2 — 2020-01-07
- 0.2.1 — 2020-01-06
- 0.2.0 — 2020-01-06
- 0.1.2 — 2020-01-06
- 0.1.1 — 2019-05-21
- … 6 more at https://npm.io/package/hangersteak/versions

## README

# Hangersteak

Node web static files server with built in compression support.

### INSTALL

```npm i hangersteak```

### USAGE

Vanilla NodeJS server. Will return 404 if not found, or the file using streams and correct mime type. Supports automatic 304 last modified headers.

```js
const http = require('http')
const hangersteak = require('hangersteak')

const server = http.createServer((req, res) => {
  // Using default options
  hangersteak(req, res)

  // With options, default values shown
  hangersteak(req, res, {
    dir: '', // Start with '/' to use absolute path
    maxAge: 3600,
    indexFile: 'index.html',
    compress: false
  })
})

server.listen(3000)
```
MIT licensed. Enjoy!

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