56 lines
1.0 KiB
Markdown
56 lines
1.0 KiB
Markdown
|
|
# My-Kaiqiuwang
|
|
|
|
<div>
|
|
<a href="https://kaiqiuwang.cc/home/network.html">
|
|
<img margin-right="14px" height="64px" src="https://kaiqiuwang.cc/home/image/logo.png" />
|
|
<a>
|
|
<a margin-left="20px">
|
|
<img width="64px" height="64px" src="https://farm7.staticflickr.com/6098/6859086480_1bbf4cf8c2_o.jpg" />
|
|
<a>
|
|
</div>
|
|
|
|
|
|
To install dependencies:
|
|
|
|
```bash
|
|
bun install
|
|
```
|
|
|
|
To start a development server:
|
|
|
|
```bash
|
|
bun dev
|
|
```
|
|
|
|
To run for production:
|
|
|
|
```bash
|
|
bun start
|
|
```
|
|
|
|
This project was created using `bun init` in bun v1.2.21. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
|
|
|
|
## Database
|
|
### [Prisma](https://www.prisma.io/docs)
|
|
|
|
设计阶段
|
|
```bash
|
|
bun --env-file=.env.development prisma db push
|
|
```
|
|
|
|
开发阶段, 生成代码
|
|
```bash
|
|
bun --env-file=.env.development prisma generate
|
|
```
|
|
|
|
在开发环境生成 migration 文件
|
|
```bash
|
|
bun --env-file=.env.development prisma migrate dev --name=<name>
|
|
```
|
|
|
|
同步到测试环境,跑测试用例用(如果需要的话)
|
|
```bash
|
|
bun --env-file=.env.test prisma migrate deploy
|
|
```
|