# static-browser-server

> A simple service worker used for the static template in sandpack, allowing users to develop websites like they would locally in the browser.

Latest version **1.1.0** (published 2025-12-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install static-browser-server
pnpm add static-browser-server
yarn add static-browser-server
bun add static-browser-server
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2025-12-17 |
| First published | 2023-02-24 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 285 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Jasper De Moor |
| Maintainers | christianalfoni, jasperdm |

## Links

- npm: https://www.npmjs.com/package/static-browser-server
- Repository: https://github.com/codesandbox/static-browser-server
- Homepage: https://github.com/codesandbox/static-browser-server#readme
- Issues: https://github.com/codesandbox/static-browser-server/issues
- npm.io page: https://npm.io/package/static-browser-server

## Dependencies (4)

- [dotenv](https://npm.io/package/dotenv.md) ^16.0.3
- [mime-db](https://npm.io/package/mime-db.md) ^1.52.0
- [outvariant](https://npm.io/package/outvariant.md) ^1.3.0
- [@open-draft/deferred-promise](https://npm.io/package/@open-draft/deferred-promise.md) ^2.1.0

## Recent versions

- 1.1.0 (latest) — 2025-12-17
- 1.0.5 — 2023-04-04
- 1.0.4 — 2023-03-31
- 1.0.3 — 2023-03-31
- 1.0.2 — 2023-03-13
- 1.0.1 — 2023-03-13
- 1.0.0 — 2023-02-24

## README

# Static browser server

A simple service worker used for the static template in sandpack, allowing users to develop websites like they would locally in the browser.

# Docker Build

Build docker image using the follow build command

```
docker buildx build --platform linux/amd64 -t static-browser-server:0.1.0 .
```

Run the docker image as follows
```
docker run --rm -p 8080:80 static-browser-server:0.1.0
```

Test by visiting the following address, you should see some HTML.
```
curl http://localhost:8080
```

In production you need to put this service behind a wildcard DNS record so dynamic URLs can be generated, that is beyond the scope of this doc.

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