# bzz-web

> Proxies Swarm bzz:/ URLs at bzz-web:/ to cater to web browser specific routing customs and expectations

Latest version **0.0.0** (published 2020-05-30) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install bzz-web
pnpm add bzz-web
yarn add bzz-web
bun add bzz-web
```

Provides the command `bzz-web`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2020-05-30 |
| First published | 2020-05-30 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | bguiz |
| Maintainers | bguiz |
| Keywords | http, swarm, bzz, proxy |

## Links

- npm: https://www.npmjs.com/package/bzz-web
- Repository: https://github.com/bguiz/bzz-web
- Homepage: https://github.com/bguiz/bzz-web#readme
- Issues: https://github.com/bguiz/bzz-web/issues
- npm.io page: https://npm.io/package/bzz-web

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) 0.19.2

## Recent versions

- 0.0.0 (latest) — 2020-05-30

## README

# `bzz-web`

Adds `bzz-web:/` that proxies `bzz:/` URLs,
so that you can surf the Dweb on Swarm.

## How to use

1. Run Swarm, which should be listening for HTTP requests on `localhost:8500`
2. Run `bzz-web`, which should listen for HTTP requests on `localhost:8511`
   ```shell
   npx bzz-swarm
   ```
3. Point your browser to:
   - Instead of: `http://localhost:8500/bzz:/somehash/`
   - ...this: `http://localhost:8511/bzz-web:/somehash/`

You can use `PORT`, `BZZ_HOST`, and `BZZ_PORT` to override default values.

## Why

The built-in HTTP router that handles `bzz:/` URLs in Swarm,
does not cater to web-browser specific routing customs & expectations,
for example handling trailing `/`-es and `index.html` files.

This is a simple server which takes the URLs,
and treats them as a "regular" HTTP web server would,
traverse the Swarm manifest tries,
and proxies the requests to Swarm as `bzz-raw:/` file hashes.

## Caveat

This is only intended to be a proof-of-concept,
and have demo quality.

It might (probably will) not work for your use case.

Patches welcome!

## Author

[Brendan Graetz](http://bguiz.com/)

## Licence

GPL-3.0

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