Skip to content

Commit

Permalink
feat: 简化逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
afzw committed Feb 3, 2024
1 parent 49ddb9d commit 02c504c
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 7,693 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@

## 项目参数

- Node.js >= v16
- Node.js >= v18
- MongoDB >= v4.2

## 快速开始

- 项目开发
### 项目开发

```sh
# 在项目根目录下:
./init.sh # 项目初始化
npm run prepare # (可选)安装husky
npm run initial # 项目初始化
npm run dev # 启动开发环境
```

- 构建上线(通过 github actions 实现 ci)
### 构建上线(通过 github actions 实现 ci)

- 在 github repo 中配置`actions secrets`.
- DOCKER_REPO - docker 仓库,例如`John/express-demo`.
- DOCKER_USER - docker 用户, 例如`John`
- DOCKER_PASS - docker 用户密码.
- 代码提交到 github repo,自动执行 github actions。
- 在 github repo 中配置`actions secrets`.
- DOCKER_REPO - docker 仓库,例如`John/express-demo`.
- DOCKER_USER - docker 用户, 例如`John`
- DOCKER_PASS - docker 用户密码.
- 代码提交到 github repo,自动执行 github actions。

## 功能介绍

- RESTFUL API
- 用户登录/注册(本地策略)
- 基于`rbac`的角色权限管理
- 基于`multer`实现文件的上传
- 支持插件
- 支持自定义脚本

## 目录结构
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
"version": "1.0.0",
"description": "web后台服务",
"engines": {
"node": ">=20",
"node": ">=18",
"mongo": ">=4.2",
"pnpm": ">=8"
},
"scripts": {
"prepare": "husky install",
"initial": "chmod +x ./init.sh | ./init.sh",
"initial": "chmod +x ./initial.sh | ./initial.sh",
"dev": "nodemon -r tsconfig-paths/register src/main.ts",
"build": "gulp",
"start": "node dist/src/main.js"
Expand Down
Loading

0 comments on commit 02c504c

Please sign in to comment.