mirror of
https://github.com/kccleoc/seedpgp-web.git
synced 2026-03-07 09:57:50 +08:00
- Update package.json version to v1.4.7 - Update README.md header to v1.4.7 - Update GEMINI.md version references to v1.4.7 - Update RECOVERY_PLAYBOOK.md version to v1.4.7 - Update SECURITY_AUDIT_REPORT.md version to v1.4.7 - Move documentation files to doc/ directory for better organization - Add new documentation files: LOCAL_TESTING_GUIDE.md, SERVE.md, TAILS_OFFLINE_PLAYBOOK.md - Add Makefile and serve.ts for improved development workflow
45 lines
860 B
Markdown
45 lines
860 B
Markdown
# Serving the built `dist/` folder
|
|
|
|
This project provides two lightweight ways to serve the static `dist/` folder locally (both are offline):
|
|
|
|
1) Bun static server (uses `serve.ts`)
|
|
|
|
```bash
|
|
# From project root
|
|
bun run serve
|
|
# or
|
|
bun ./serve.ts
|
|
# Open: http://127.0.0.1:8000
|
|
```
|
|
|
|
1) Python HTTP server (zero-deps, portable)
|
|
|
|
```bash
|
|
# From the `dist` folder
|
|
cd dist
|
|
python3 -m http.server 8000
|
|
# Open: http://localhost:8000
|
|
```
|
|
|
|
Convenience via `package.json` scripts:
|
|
|
|
```bash
|
|
# Run Bun server
|
|
bun run serve
|
|
|
|
# Run Python server (from project root)
|
|
bun run serve:py
|
|
```
|
|
|
|
Makefile shortcuts:
|
|
|
|
```bash
|
|
make serve-bun # runs Bun server
|
|
make serve-local # runs Python http.server
|
|
```
|
|
|
|
Notes:
|
|
|
|
- The Bun server sets correct `Content-Type` for `.wasm` and other assets.
|
|
- Always use HTTP (localhost) rather than opening `file://` to avoid CORS/file restrictions.
|