add: 部署教程

This commit is contained in:
cancerai committed 2026-10-12 11:27:56 +08:00
1 parent 1d2b261856
commit d8880e98ea
1 file changed
+25 -8
+25 -8
View File
@@ -1,15 +1,32 @@
# user-auth
To install dependencies:
支持环境:
```bash
bun install
Linux / MacOS
所需环境:
``` bash
bun
mariadb/mysql
```
To run:
部署步骤:
```bash
bun run index.ts
```
``` bash
# 准备数据库
# 进入数据库
create database user_auth # 数据库名可根据实际替换
source /your/sql/file/path/init_table.sql # sql在 ./sql/init_table.sql中
# 退出数据库
This project was created using `bun init` in bun v1.4.2. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
# 设置环境变量,根据实际修改
export DB_HOST="localhost" # 数据库主机名/ip
export DB_USER_NAME="root" # 数据库用户名
export DB_USER_PASSWD="root" # 数据库密码
export DB_NAME="user_auth" # 数据库名字
export admin_name="admin" # 默认管理员名字
export admin_passwd="admin" # 默认管理员密码
# 运行项目
bun run dev
```