Skip to content

Commit

Permalink
📝 update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ileostar committed Jul 11, 2024
1 parent a8ae6ff commit 4535f67
Show file tree
Hide file tree
Showing 3 changed files with 6,708 additions and 5,185 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,48 @@
- [Redis](https://redis.io/)
- [jest](https://jestjs.io/)

## 运行

### 安装

`clone` 仓库后进行 `pnpm i` 安装项目依赖,这里要保证你的node版本在20以上

### 环境配置

首先复制 `./apps/server/.env.example` 改成 `.env` 并更改里面配置,

```bash
mysql://root:root@127.0.0.1:3306/<your-database>
SECRET=<your-secret>
REDIS_URL="redis://127.0.0.1:6379"
```

`<your-secret>` 填一串字符串

这里要确保你的数据库 `<your-database>` 已经创建

接着在根目录运行 `pnpm db:init` 初始化数据库表,按照提示选择 `yes` 即可

### 运行服务

#### Server 端

```bash
pnpm dev:server
```

启动后访问 `localhost:3001` 即可

Swagger地址:`localhost:3001/swagger`

#### Web 端

```bash
pnpm dev:server
```

启动后访问 `localhost:3000` 即可

## 贡献

欢迎提PR贡献❤
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node": ">=20.12.2"
},
"scripts": {
"schema:build": "pnpm -F @poster-craft/schema build",
"schema:build": "pnpm -F @poster-craft/schema build",
"db:init": "pnpm schema:build && pnpm -F @poster-craft/db run init",
"db:init:test": "pnpm -F @poster-craft/db run init:test",
"dev:web": "pnpm -F web dev",
Expand Down
Loading

0 comments on commit 4535f67

Please sign in to comment.