preview

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Start Preview Server

启动预览服务器

Start the Next.js development server for local preview.
启动Next.js开发服务器进行本地预览。

Steps

步骤

  1. Check if dependencies are installed:
    bash
    [ -d "node_modules" ] || pnpm install
  2. Check if port 3000 is available:
    bash
    lsof -i :3000 | grep LISTEN
  3. Start development server:
    bash
    pnpm dev
  4. Report the URL: http://localhost:3000
  1. 检查依赖是否已安装:
    bash
    [ -d "node_modules" ] || pnpm install
  2. 检查3000端口是否可用:
    bash
    lsof -i :3000 | grep LISTEN
  3. 启动开发服务器:
    bash
    pnpm dev
  4. 访问地址:http://localhost:3000

If Port 3000 is Busy

如果3000端口被占用

Suggest alternative:
bash
pnpm dev -- -p 3001
Or kill existing process (with user confirmation):
bash
kill $(lsof -t -i:3000)
pnpm dev
建议使用替代方案:
bash
pnpm dev -- -p 3001
或者终止现有进程(需用户确认):
bash
kill $(lsof -t -i:3000)
pnpm dev

Docker Alternative

Docker替代方案

If Docker is preferred:
bash
docker compose up
Server will be available at http://localhost:3000
如果偏好使用Docker:
bash
docker compose up
服务器将在 http://localhost:3000 可用