add stable media support and sync skillhub UI

This commit is contained in:
wtgoku
2026-04-08 23:17:42 +08:00
parent ff4f370763
commit 4b20dc5e37
32 changed files with 6269 additions and 393 deletions
+43
View File
@@ -0,0 +1,43 @@
# Local Subdomain Preview
Use a local subdomain-style URL instead of `127.0.0.1:3000`.
## Recommended URL
Modern browsers resolve `*.localhost` to the local machine automatically, so no `/etc/hosts` change is required.
- `http://popiart.localhost:3100/zh`
- `http://popiart.localhost:3100/en`
- `http://popiart.localhost:3100/zh/console`
- `http://popiart.localhost:3100/zh/skills`
## Run
Development server:
```bash
npm run dev:subdomain
```
Production preview:
```bash
npm run build
npm run start:subdomain
```
## Why this works
- The URL looks like a domain instead of `127.0.0.1`.
- It avoids port `3000` and uses `3100`.
- Session cookies stay same-origin because the app uses relative `/api/*` routes.
## If you need a real custom domain later
If you want a domain like `console.popi.art` locally, the next step is:
1. Add a hosts mapping to `127.0.0.1`.
2. Run a reverse proxy on port `80` or `443`.
3. Point that domain to the Next.js app.
That is a separate setup from the zero-config `*.localhost` approach.