浏览代码

docs: update migration guide formatting

Timothy Pomeroy 1 月之前
父节点
当前提交
92b3619b88
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      docs/MIGRATION_API_PROXY.md

+ 10 - 1
docs/MIGRATION_API_PROXY.md

@@ -16,16 +16,18 @@ The web application now uses a Next.js API proxy by default instead of direct cl
 ### For Local Development
 
 1. **Update your `.env.local` file**:
+
    ```bash
    cd apps/web
    # Remove or comment out the old direct API URL
    # NEXT_PUBLIC_WATCH_FINISHED_API=http://localhost:3001
-   
+
    # Add the backend API URL for the Next.js server
    API_URL=http://localhost:3001
    ```
 
 2. **Restart the development servers**:
+
    ```bash
    # From project root
    pnpm run dev
@@ -38,6 +40,7 @@ The web application now uses a Next.js API proxy by default instead of direct cl
 ### For Docker Deployment
 
 1. **Rebuild your Docker images**:
+
    ```bash
    docker-compose build
    ```
@@ -54,10 +57,12 @@ The web application now uses a Next.js API proxy by default instead of direct cl
 ### For Remote Access
 
 **Before** (didn't work remotely):
+
 - Web UI at `http://192.168.1.100:3000`
 - Tried to connect to API at `http://localhost:3001` (failed from remote)
 
 **After** (works remotely):
+
 - Web UI at `http://192.168.1.100:3000`
 - API requests automatically proxied through the web server
 - WebSocket connections also proxied
@@ -73,6 +78,7 @@ API_URL=http://localhost:3001
 ```
 
 This is useful for:
+
 - Development across multiple machines
 - Custom API server locations
 - Debugging proxy issues
@@ -80,18 +86,21 @@ This is useful for:
 ## Architecture Changes
 
 ### Before
+
 ```
 Browser → http://localhost:3001/api/* (direct)
 Browser → ws://localhost:3001/socket.io (direct)
 ```
 
 ### After (Default)
+
 ```
 Browser → http://localhost:3000/api/* → Next.js Proxy → http://localhost:3001/*
 Browser → ws://localhost:3000/socket.io → Next.js Proxy → ws://localhost:3001/socket.io
 ```
 
 ### After (With NEXT_PUBLIC_WATCH_FINISHED_API set)
+
 ```
 Browser → http://localhost:3001/api/* (direct, bypasses proxy)
 Browser → ws://localhost:3001/socket.io (direct, bypasses proxy)