# lws-range

> Adds support for HTTP Range Requests to lws

Latest version **4.0.1** (published 2022-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install lws-range
pnpm add lws-range
yarn add lws-range
bun add lws-range
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2022-02-27 |
| First published | 2018-01-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12.17 |
| Dependencies | 1 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lloyd Brookes |
| Maintainers | 75lb |
| Keywords | lws, lws-middleware, range, request |

## Links

- npm: https://www.npmjs.com/package/lws-range
- Repository: https://github.com/lwsjs/range
- Homepage: https://github.com/lwsjs/range#readme
- Issues: https://github.com/lwsjs/range/issues
- npm.io page: https://npm.io/package/lws-range

## Dependencies (1)

- [koa-range](https://npm.io/package/koa-range.md) ^0.3.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 4.0.1 (latest) — 2022-02-27
- 4.0.0 — 2022-02-27
- 3.0.0 — 2020-02-09
- 2.0.1 — 2019-06-09
- 2.0.0 — 2019-06-03
- 1.1.1 — 2019-02-28
- 1.1.0 — 2018-01-25

## README

[![view on npm](https://badgen.net/npm/v/lws-range)](https://www.npmjs.org/package/lws-range)
[![npm module downloads](https://badgen.net/npm/dt/lws-range)](https://www.npmjs.org/package/lws-range)
[![Gihub repo dependents](https://badgen.net/github/dependents-repo/lwsjs/range)](https://github.com/lwsjs/range/network/dependents?dependent_type=REPOSITORY)
[![Gihub package dependents](https://badgen.net/github/dependents-pkg/lwsjs/range)](https://github.com/lwsjs/range/network/dependents?dependent_type=PACKAGE)
[![Node.js CI](https://github.com/lwsjs/range/actions/workflows/node.js.yml/badge.svg)](https://github.com/lwsjs/range/actions/workflows/node.js.yml)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)

# lws-range

Lws middleware plugin adding support for [HTTP Range Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests). Wraps [koa-range](https://github.com/koajs/koa-range).

## Synopsis

Install the plugin then launch a server supporting only range requests and static files.

```
$ npm install --save-dev lws-range

$ ws --stack lws-range lws-static
Listening on http://mbp.local:8000, http://127.0.0.1:8000, http://192.168.0.200:8000
```

Make some requests - note the presence of `Accept-Ranges: bytes` in the response.

```
$ curl http://127.0.0.1:8000/package.json -I
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 649
Last-Modified: Sun, 27 Feb 2022 14:26:27 GMT
Cache-Control: max-age=0
Content-Type: application/json; charset=utf-8
Date: Sun, 27 Feb 2022 14:30:21 GMT
```

For more info about `--stack` please read [Using Middleware](https://github.com/lwsjs/local-web-server/wiki/Using-middleware) and the rest of the [wiki](https://github.com/lwsjs/local-web-server/wiki/).

* * *

&copy; 2018-22 Lloyd Brookes \<75pound@gmail.com\>.

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