docs(quick-2): Update start.sh for network access and port config

- Dev/preview servers accessible from other machines (--host flag)
- Port configuration via menu or CLI args
- dev:8080 and dev:9090 shortcuts for kiosk/remote modes
- Shows connection info (local + network IP)
This commit is contained in:
2026-03-13 11:05:59 +08:00
parent b474f7067a
commit e327ab9ac8
4 changed files with 198 additions and 23 deletions

View File

@@ -102,7 +102,8 @@ None - ready to begin Phase 1 planning.
| # | Description | Date | Commit | Directory |
|---|-------------|------|--------|-----------|
| 1 | Create start.sh script with menu for test, dev, etc. | 2026-03-13 | - | [1-create-start-sh-script-with-menu-for-tes](./quick/1-create-start-sh-script-with-menu-for-tes/) |
| 1 | Create start.sh script with menu for test, dev, etc. | 2026-03-13 | b474f70 | [1-create-start-sh-script-with-menu-for-tes](./quick/1-create-start-sh-script-with-menu-for-tes/) |
| 2 | Update start.sh for network access and port configuration | 2026-03-13 | - | [2-update-start-sh-for-network-access-and-p](./quick/2-update-start-sh-for-network-access-and-p/) |
---

View File

@@ -0,0 +1,33 @@
---
plan: 1
type: quick
files_modified:
- start.sh
---
<objective>
Update start.sh to support network access (--host flag) and custom port configuration for dev/preview servers
</objective>
<tasks>
<task>
<name>Update start.sh with network and port options</name>
<files>start.sh</files>
<action>
1. Update dev command to include --host flag for network access
2. Add port configuration (default 5173 for dev, 4173 for preview)
3. Add menu options for port selection
4. Show connection info after starting server (IP address, port)
</action>
<verify>grep -E "(host|port|--host)" start.sh | head -10</verify>
<done>start.sh updated with network access and port options</done>
</task>
</tasks>
<success_criteria>
- Dev server accessible from other machines
- Port can be customized via menu or arguments
- Connection info displayed when server starts
</success_criteria>

View File

@@ -0,0 +1,47 @@
# Quick Task 2 Summary - Update start.sh for Network Access
**Task:** Update start.sh for network access and port configuration
**Date:** 2026-03-13
**Status:** Complete
---
## Completed
### Task 1: Update start.sh with network and port options
- **Network access**: Dev and preview servers now use `--host` flag
- **Port configuration**:
- Default dev port: 5173
- Default preview port: 4173
- Can be changed via menu (option `p`)
- **Menu options added**:
- `dev` - Default dev server
- `dev:8080` - Dev server on port 8080 (kiosk mode)
- `dev:9090` - Dev server on port 9090 (remote mode)
- `p` - Change default ports
- **Connection info**: Shows local and network URLs when server starts
- **Command line usage**:
- `./start.sh dev`
- `./start.sh dev:8080`
- `./start.sh dev:9090`
- `./start.sh preview`
---
## Usage
```bash
# Interactive menu
./start.sh
# Direct commands
./start.sh dev # Default port 5173
./start.sh dev:8080 # Port 8080 (kiosk)
./start.sh dev:9090 # Port 9090 (remote)
./start.sh preview # Preview on 4173
# Change ports via menu (option p)
```
**Network access:** Servers now bind to `0.0.0.0` and show both localhost and network IP addresses.