首次提交

This commit is contained in:
zeronline
2026-06-25 08:39:47 +08:00
parent 20a93c703a
commit c5cccd346b
169 changed files with 24720 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
# 寸进 Web 端 - 宝塔面板部署指南
## 目录结构
deploy/web/
├── .next/ # 构建产物
├── public/ # 静态资源
├── package.json # 依赖配置
├── next.config.ts # Next.js 配置
├── pnpm-lock.yaml # 锁文件
├── .env.production # 生产环境变量(修改 API 地址)
├── start.sh # 启动脚本
└── deploy-readme-web.md
## 部署到宝塔
### 1. 上传部署包
上传 build/inchstep-web-deploy.zip 到服务器
解压到 /www/wwwroot/inchstep-web/
### 2. 配置 API 地址
编辑 .env.production,修改 NEXT_PUBLIC_API_URL 为你的后端地址
### 3. 宝塔添加 Node.js 项目
宝塔面板 -> 软件商店 -> 安装 Node.js 项目 插件
宝塔面板 -> Node.js 项目 -> 添加项目:
| 配置项 | 值 |
|--------|-----|
| 项目名称 | inchstep-web |
| 项目路径 | /www/wwwroot/inchstep-web |
| 项目端口 | 3000 |
| 启动命令 | npm start |
| Node 版本 | v20+ |
| 开机启动 | 勾选 |
### 4. 验证
访问 http://你的服务器IP:3000
+8
View File
@@ -0,0 +1,8 @@
import type { NextConfig } from 'next'
const nextConfig: NextConfig = {
reactStrictMode: true,
transpilePackages: ['../shared'],
}
export default nextConfig
+24
View File
@@ -0,0 +1,24 @@
{
"name": "inchstep-web",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "vitest run"
},
"dependencies": {
"next": "^15.2.0",
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"devDependencies": {
"@types/node": "^22.0.0",
"@types/react": "^19.1.0",
"@types/react-dom": "^19.1.0",
"typescript": "^5.7.0",
"vitest": "^3.0.0"
}
}
+1566
View File
File diff suppressed because it is too large Load Diff
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$DIR"
cp .env.production .env.local 2>/dev/null
npx next start -p 3000