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 9c069d4822 Implement iframe detection in Project.vue to conditionally render control buttons. This enhancement improves user experience by hiding controls when the component is displayed within an iframe. 2 weeks ago
backend Add production environment configuration example and remove outdated deployment documentation 2 weeks ago
frontend Implement iframe detection in Project.vue to conditionally render control buttons. This enhancement improves user experience by hiding controls when the component is displayed within an iframe. 2 weeks ago
.env.backend.example Add production environment configuration example and remove outdated deployment documentation 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
README.md Add production environment configuration example and remove outdated deployment documentation 2 weeks ago
SETUP.md all code 2 weeks ago
deploy.sh Refactor JWT_SECRET handling in deploy.sh to use printf for consistent formatting. This change ensures that the JWT_SECRET is correctly appended to backend/.env with a newline, improving the script's reliability. 2 weeks ago
package.json Add production environment configuration example and remove outdated deployment documentation 2 weeks ago
pnpm-lock.yaml add 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

生产部署 🚀

部署

# 1. 构建项目
pnpm build

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

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

# 4. 启动服务
pnpm start

常用命令

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

项目结构

just-demo/
├── backend/          # 后端服务
├── frontend/         # 前端应用
└── package.json      # 根配置

功能特性

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