ES module imports fail via file:// or raw Forge URLs (CORS + missing Content-Type headers). boot.js detects this and warns users. Three deployment options: - ./preview.sh — local Python server, correct MIME types - docker compose up nexus-preview — nginx on :8080 + WS proxy - Push to main — GitHub Pages auto-deploy Fixes #1339
27 lines
786 B
Markdown
27 lines
786 B
Markdown
# Nexus Preview
|
|
|
|
ES module imports fail via `file://` or raw Forge URLs. `boot.js` already warns: _"Serve over HTTP to initialize Three.js."_
|
|
|
|
## Quick Start
|
|
|
|
```bash
|
|
./preview.sh # http://localhost:8080 (Python, no deps)
|
|
./preview.sh docker # http://localhost:8080 (nginx + WS proxy)
|
|
docker compose up -d nexus-preview nexus-backend # full stack
|
|
```
|
|
|
|
## Options
|
|
|
|
| Method | Command | Port |
|
|
|--------|---------|------|
|
|
| Local Python | `./preview.sh` | 8080 |
|
|
| Docker nginx | `docker compose up nexus-preview` | 8080 |
|
|
| GitHub Pages | push to main | auto |
|
|
|
|
## Files
|
|
|
|
- `Dockerfile.preview` — nginx container
|
|
- `preview/nginx.conf` — MIME types + WebSocket proxy
|
|
- `preview.sh` — Python preview server
|
|
- `.github/workflows/pages.yml` — GitHub Pages CI/CD
|