Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

xjh22222228/tomato-work-server

Repository files navigation


Tomato Work 个人事务管理系统

Server

说明

由于一些原因,这个项目之前是由 Egg 框架编写,对应前端源代码 tomato-work-client,如果你想学习或了解 Egg.js 框架这是不错的选择。

MySQL Setup

MySQL >= 8.0

  • 创建数据库 tomato_work
  • 运行根目录 sql.sql

环境变量

项目不自带 .env.local.env.production, 需要自己 Copy .env.development

  • .env.development 开发环境 npm run start:dev
  • .env.local 开发环境 npm run start
  • .env.production 生产环境 npm run start:prod

可以不使用文件环境变量,使用系统环境变量,已做兼容处理。

Build Setup

启动项目之前请配置数据库信息 .env.development

# Download
git clone --depth=1 https://github.com/xjh22222228/tomato-work-server.git
# Install
pnpm i
# Port: 7003
npm run start:dev
# Build start
npm run start

部署

npm run build # 编译
npm run pm2 # 启动

SQL迁移

$ npm run migration:generate -- migrations/sql
$ npm run migration:run

License

MIT

AltStyle によって変換されたページ (->オリジナル) /