mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-30 12:25:29 +08:00
840 B
840 B
开发配置
此文档基于 LangBot 4.0 版本编写
LangBot 分为前端和后端,前端使用 Next.js + shadcn 开发,后端通过 Quart(Flask 的异步版本)开发。
后端
代码位于 pkg 目录下,由根目录的 main.py 文件引导启动。
安装依赖
pip install -r requirements.txt
启动后端
python main.py
此时配置文件会自动生成到 data/config.yaml 文件中。
前端
代码位于 web 目录下,需要安装 Node.js。
安装依赖
npm install
去web/src/app/infra/http/HttpClient.ts文件中,将最底部的export const httpClient = new HttpClient('/');修改为export const httpClient = new HttpClient('http://localhost:5300');,以确保前端可以访问到独立的后端。
启动调试
npm run dev