From d8880e98ea0751c31f5cf24b621f31fb016a7f86 Mon Sep 17 00:00:00 2001 From: CancerAi Date: Mon, 12 Oct 2026 11:27:56 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E9=83=A8=E7=BD=B2=E6=95=99=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c74b939..5b475e8 100644 --- a/README.md +++ b/README.md @@ -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 +``` \ No newline at end of file