RaulLazaro/dsh-preview-plugin ↗★ 0
dsh-preview-plugin
Live preview tab for DSH — embed any dev server in an iframe
AI Analysis
核心用途是在 DSH 界面内直接预览 AI 生成或修改的网页/Web 应用。适合前端开发者或使用 AI 进行网页开发的用户。需要用户在服务器上启动开发服务,并在预览面板中输入对应端口号。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:RaulLazaro/dsh-preview-pluginREADME
Read the full README ↗Usage
- Start your dev server on the VPS (e.g.
npm run dev -- --host 0.0.0.0 --port 3000) - Open the Preview tab in DSH Web GUI
- Enter the port number (e.g.
3000) and click Go - The iframe will load the app through the transparent proxy
API
The plugin exposes a port management API:
| Method | Endpoint | Description |
|---|---|---|
GET | /api/preview-port | Get the current global port |
GET | /api/preview-port?sessionId= | Get port for a session (falls back to global) |
POST | /api/preview-port | Set global port ({ "port": 3000 }) |
POST | /api/preview-port?sessionId= | Set port for a session |