diff --git a/run.sh b/run.sh
index 646527c..3bb2613 100644
--- a/run.sh
+++ b/run.sh
@@ -1,134 +1,151 @@
-#!/bin/bash
-
-# --- 颜色定义 ---
-GREEN='\033[0;32m'
-BLUE='\033[0;34m'
-YELLOW='\033[1;33m'
-RED='\033[0;31m'
-NC='\033[0m'
-
-PID_FILE="app.pid"
-LOG_FILE="app.log"
-
-get_port_pids() {
-    if command -v lsof >/dev/null 2>&1; then
-        lsof -t -i:2333 2>/dev/null
-    elif command -v ss >/dev/null 2>&1; then
-        ss -ltnp 'sport = :2333' 2>/dev/null | sed -n 's/.*pid=\([0-9]\+\).*//p' | sort -u
-    elif command -v netstat >/dev/null 2>&1; then
-        netstat -ltnp 2>/dev/null | sed -n 's/.* \([0-9]\+\)\/.*//p' | sort -u
-    elif command -v fuser >/dev/null 2>&1; then
-        fuser -n tcp 2333 2>/dev/null | tr ' ' '
-' | sort -u
-    fi
-}
-
-# --- 逻辑封装 ---
-
-function do_stop() {
-    printf "${YELLOW}正在停止 STARK Todo List...${NC}\n"
-    
-    # 1. 首先尝试通过 PID 文件停止
-    if [ -f "$PID_FILE" ]; then
-        PID=$(cat "$PID_FILE")
-        pkill -P $PID >/dev/null 2>&1
-        kill $PID >/dev/null 2>&1
-        rm "$PID_FILE"
-    fi
-
-    # 2. 强力兜底：查找并杀死占�?2333 端口的所�?Node 进程
-    PORT_PIDS=$(get_port_pids)
-    if [ -n "$PORT_PIDS" ]; then
-        for P in $PORT_PIDS; do
-            kill -9 $P >/dev/null 2>&1
-        done
-    fi
-    printf "${YELLOW}已停止所有相关进程并释放端口�?{NC}\n"
-}
-
-function do_start() {
-    if [ -f "$PID_FILE" ] && kill -0 $(cat "$PID_FILE") 2>/dev/null; then
-        printf "${YELLOW}应用已经在运行中 (PID: $(cat $PID_FILE))${NC}\n"
-        return 0
-    fi
-
-    PORT_PID=$(get_port_pids)
-    if [ -n "$PORT_PID" ]; then
-        printf "${YELLOW}?? 2333 ??????????????...${NC}\n"
-        do_stop
-        sleep 1
-        PORT_PID=$(get_port_pids)
-        if [ -n "$PORT_PID" ]; then
-            printf "${RED}??: ?? 2333 ?????????????????${NC}\n"
-            return 1
-        fi
-    fi
-
-    printf "${GREEN}?? $PM ?? STARK Todo List (production)...${NC}\n"
-    # 抑制安装输出，保持界面整�?    $PM install > /dev/null 2>&1
-    
-    $PM run build > /dev/null 2>&1
-
-    NODE_ENV=production nohup $PM run start > "$LOG_FILE" 2>&1 &
-    echo $! > "$PID_FILE"
-    
-    sleep 2
-    if kill -0 $(cat "$PID_FILE") 2>/dev/null; then
-        printf "${GREEN}启动成功！访�? http://localhost:2333${NC}\n"
-    else
-        printf "${RED}启动失败，请查看 $LOG_FILE${NC}\n"
-        rm -f "$PID_FILE"
-    fi
-}
-
-# --- 初始�?---
-if [ ! -f "todos.json" ]; then
-    echo "[]" > todos.json
-    printf "${YELLOW}已创建初始数据文�?todos.json${NC}\n"
-fi
-
-# 检查包管理�?
-if command -v pnpm >/dev/null 2>&1; then
-    PM="pnpm"
-else
-    PM="npm"
-fi
-
-case "$1" in
-    start)
-        do_start
-        ;;
-    stop)
-        do_stop
-        ;;
-    restart)
-        printf "${BLUE}正在执行彻底重启...${NC}\n"
-        do_stop
-        sleep 1
-        rm -rf .next
-        do_start
-        ;;
-    logs)
-        [ -f "$LOG_FILE" ] && tail -f "$LOG_FILE" || printf "${RED}日志文件不存�?{NC}\n"
-        ;;
-    status)
-        if [ -n "$(get_port_pids)" ]; then
-            printf "${GREEN}应用正在运行${NC}\n"
-            (command -v lsof >/dev/null 2>&1 && lsof -i:2333) || (command -v ss >/dev/null 2>&1 && ss -ltnp 'sport = :2333') || (command -v netstat >/dev/null 2>&1 && netstat -ltnp) || true
-        else
-            printf "${RED}应用未运�?{NC}\n"
-        fi
-        ;;
-    clean)
-        printf "${BLUE}清理缓存和日�?..${NC}\n"
-        rm -rf .next "$LOG_FILE" "$PID_FILE"
-        printf "${GREEN}清理完成${NC}\n"
-        ;;
-    *)
-        printf "${BLUE}STARK Todo List 本地管理脚本${NC}\n"
-        echo "用法: $0 [start|stop|restart|logs|status|clean]"
-        exit 1
-        ;;
-esac
-
-
+#!/bin/bash
+
+# --- 颜色定义 ---
+GREEN='\033[0;32m'
+BLUE='\033[0;34m'
+YELLOW='\033[1;33m'
+RED='\033[0;31m'
+NC='\033[0m'
+
+PID_FILE="app.pid"
+LOG_FILE="app.log"
+
+get_port_pids() {
+    if command -v lsof >/dev/null 2>&1; then
+        lsof -t -i:2333 2>/dev/null
+    elif command -v ss >/dev/null 2>&1; then
+        ss -ltnp 'sport = :2333' 2>/dev/null | sed -n 's/.*pid=\([0-9]\+\).*/\1/p' | sort -u
+    elif command -v netstat >/dev/null 2>&1; then
+        netstat -ltnp 2>/dev/null | sed -n 's/.* \([0-9]\+\)\/.*/\1/p' | sort -u
+    elif command -v fuser >/dev/null 2>&1; then
+        fuser -n tcp 2333 2>/dev/null | tr ' ' '\n' | sort -u
+    fi
+}
+
+prepare_standalone() {
+    if [ -f ".next/standalone/server.js" ]; then
+        rm -rf .next/standalone/.next .next/standalone/public
+        mkdir -p .next/standalone/.next
+        [ -d .next/static ] && cp -r .next/static .next/standalone/.next/
+        [ -d public ] && cp -r public .next/standalone/
+    fi
+}
+
+start_server() {
+    if [ -f ".next/standalone/server.js" ]; then
+        NODE_ENV=production PORT=2333 nohup node .next/standalone/server.js > "$LOG_FILE" 2>&1 &
+    else
+        NODE_ENV=production nohup $PM run start > "$LOG_FILE" 2>&1 &
+    fi
+}
+
+# --- 逻辑封装 ---
+
+function do_stop() {
+    printf "${YELLOW}正在停止 STARK Todo List...${NC}\n"
+    
+    # 1. 首先尝试通过 PID 文件停止
+    if [ -f "$PID_FILE" ]; then
+        PID=$(cat "$PID_FILE")
+        pkill -P $PID >/dev/null 2>&1
+        kill $PID >/dev/null 2>&1
+        rm "$PID_FILE"
+    fi
+
+    # 2. 强力兜底：查找并杀死占?2333 端口的所?Node 进程
+    PORT_PIDS=$(get_port_pids)
+    if [ -n "$PORT_PIDS" ]; then
+        for P in $PORT_PIDS; do
+            kill -9 $P >/dev/null 2>&1
+        done
+    fi
+    printf "${YELLOW}已停止所有相关进程并释放端口?{NC}\n"
+}
+
+function do_start() {
+    if [ -f "$PID_FILE" ] && kill -0 $(cat "$PID_FILE") 2>/dev/null; then
+        printf "${YELLOW}应用已经在运行中 (PID: $(cat $PID_FILE))${NC}\n"
+        return 0
+    fi
+
+    PORT_PID=$(get_port_pids)
+    if [ -n "$PORT_PID" ]; then
+        printf "${YELLOW}?? 2333 ??????????????...${NC}\n"
+        do_stop
+        sleep 1
+        PORT_PID=$(get_port_pids)
+        if [ -n "$PORT_PID" ]; then
+            printf "${RED}??: ?? 2333 ?????????????????${NC}\n"
+            return 1
+        fi
+    fi
+
+    printf "${GREEN}?? $PM ?? STARK Todo List (production)...${NC}\n"
+    # 抑制安装输出，保持界面整?    $PM install > /dev/null 2>&1
+    
+    $PM run build > /dev/null 2>&1
+    prepare_standalone
+
+    start_server
+    echo $! > "$PID_FILE"
+    
+    sleep 2
+    if kill -0 $(cat "$PID_FILE") 2>/dev/null; then
+        printf "${GREEN}启动成功！访? http://localhost:2333${NC}\n"
+    else
+        printf "${RED}启动失败，请查看 $LOG_FILE${NC}\n"
+        rm -f "$PID_FILE"
+    fi
+}
+
+# --- 初始?---
+if [ ! -f "todos.json" ]; then
+    echo "[]" > todos.json
+    printf "${YELLOW}已创建初始数据文?todos.json${NC}\n"
+fi
+
+# 检查包管理?
+if command -v pnpm >/dev/null 2>&1; then
+    PM="pnpm"
+else
+    PM="npm"
+fi
+
+case "$1" in
+    start)
+        do_start
+        ;;
+    stop)
+        do_stop
+        ;;
+    restart)
+        printf "${BLUE}正在执行彻底重启...${NC}\n"
+        do_stop
+        sleep 1
+        rm -rf .next
+        do_start
+        ;;
+    logs)
+        [ -f "$LOG_FILE" ] && tail -f "$LOG_FILE" || printf "${RED}日志文件不存?{NC}\n"
+        ;;
+    status)
+        if [ -n "$(get_port_pids)" ]; then
+            printf "${GREEN}应用正在运行${NC}\n"
+            (command -v lsof >/dev/null 2>&1 && lsof -i:2333) || (command -v ss >/dev/null 2>&1 && ss -ltnp 'sport = :2333') || (command -v netstat >/dev/null 2>&1 && netstat -ltnp) || true
+        else
+            printf "${RED}应用未运?{NC}\n"
+        fi
+        ;;
+    clean)
+        printf "${BLUE}清理缓存和日?..${NC}\n"
+        rm -rf .next "$LOG_FILE" "$PID_FILE"
+        printf "${GREEN}清理完成${NC}\n"
+        ;;
+    *)
+        printf "${BLUE}STARK Todo List 本地管理脚本${NC}\n"
+        echo "用法: $0 [start|stop|restart|logs|status|clean]"
+        exit 1
+        ;;
+esac
+
+
