You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
dash 3cbaeecb04 Refactor sqlite3 installation process in deploy.sh. Updated script to force reinstall and rebuild sqlite3 to ensure compatibility with the current platform. 2 weeks ago
backend Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
frontend Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
.gitignore Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
DEPLOY.md Update deployment documentation and scripts for sqlite3 issues. Added a troubleshooting section in DEPLOY.md, created fix-sqlite3.sh script for automated binding fixes, and enhanced deploy.sh to check for necessary build tools and rebuild sqlite3 as part of the deployment process. 2 weeks ago
DEPLOYMENT-GUIDE.md Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
README.md Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
SETUP.md all code 2 weeks ago
deploy.ps1 Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
deploy.sh Refactor sqlite3 installation process in deploy.sh. Updated script to force reinstall and rebuild sqlite3 to ensure compatibility with the current platform. 2 weeks ago
docker-compose.yml Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
docker-deploy.sh Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
docker-test.bat Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
docker-test.sh Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
ecosystem.config.js Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
fix-sqlite3.sh Update deployment documentation and scripts for sqlite3 issues. Added a troubleshooting section in DEPLOY.md, created fix-sqlite3.sh script for automated binding fixes, and enhanced deploy.sh to check for necessary build tools and rebuild sqlite3 as part of the deployment process. 2 weeks ago
nginx.conf Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
package.json Enhance deployment process and project structure. Added deployment scripts for Windows and Linux, a comprehensive deployment guide, and Docker support. Updated .gitignore to include additional files and directories. Introduced PM2 configuration for process management and health checks for backend and frontend ser 2 weeks ago
pnpm-lock.yaml all code 2 weeks ago
project.md add md 2 weeks ago
prompt.md add md 2 weeks ago

README.md

前端简易部署项目

一个基于 Koa3 和 Vue3 的前端网页部署平台,支持上传单个 HTML 文件或完整项目文件夹,提供沙盒预览、文档管理、用户权限控制等功能。

技术栈

  • 后端:Koa3 + TypeScript
  • 前端:Vue3 + TypeScript + Vite
  • 数据库:SQLite + Knex.js
  • 包管理:pnpm

快速开始

开发环境

# 1. 安装依赖
pnpm install:all

# 2. 启动开发服务器
pnpm dev

# 或分别启动
pnpm dev:backend  # 后端:http://localhost:3000
pnpm dev:frontend # 前端:http://localhost:5173

生产部署 🚀

一键部署(推荐)

Windows:

.\deploy.ps1

Linux/macOS:

chmod +x deploy.sh
./deploy.sh

部署脚本会自动完成:

  • 检查并安装必要工具(Node.js、pnpm、PM2)
  • 安装项目依赖
  • 构建前后端项目
  • 创建生产环境配置
  • 运行数据库迁移
  • 使用 PM2 启动服务
  • 配置开机自启动

部署成功后访问:

手动部署

# 1. 构建项目
pnpm build

# 2. 创建环境配置
cp backend/.env.example backend/.env
# 编辑 backend/.env 修改配置

# 3. 运行数据库迁移
cd backend && pnpm migrate:prod && cd ..

# 4. 启动服务
pnpm start

常用命令

pm2 status          # 查看服务状态
pm2 logs            # 查看日志
pm2 restart all     # 重启服务
pm2 stop all        # 停止服务

📖 详细部署说明请查看 DEPLOY.md

项目结构

just-demo/
├── backend/          # 后端服务
├── frontend/         # 前端应用
├── database/         # 数据库文件
└── package.json      # 根配置

功能特性

  • 用户认证(注册、登录)
  • 网页上传(单个HTML或ZIP文件夹)
  • 项目展示和筛选
  • 沙盒预览
  • 文档管理
  • 权限控制