-
Notifications
You must be signed in to change notification settings - Fork 7
后端接口使用说明 #4
Copy link
Copy link
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Activity
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
1、先去https://github.com/go-laoji/3d-datacenter/releases/tag/api-latest 下载对应系统版本的程序
2、init_data 为数据库初始化、模拟数据写入程序;backend 为后端接口程序
3、在目录中创建一个 config.yml 文件内容如下:
4、初始化数据库
init_data-{xxx}-{xxx} -conf config.yml请替换 xxx 为指定的系统和 cpu 架构5、启动后端服务
backend-{xxx}-{xxx} -conf config.yml请替换 xxx 为指定的系统和 cpu 架构6、前端代码支行
yarn dev则会自动代理到 8008 的后端服务,默认帐号和密码为 admin/admin注意:
1、linux 和 macos 需要给程序添加可执行权限
chmod +x init_data-{xxx}-{xxx}backend-{xxx}-{xxx}2、macos 下可能会提示软件有风险,需要在
隐私与安全性允许软件支行3、后端使用 gorm 连接数据库,不过开放的服务只支持 sqlite 数据库,修改数据库配置为其它数据源不可运行