8000 GitHub - wwsheng009/yao-init: yao project-init template · GitHub
[go: up one dir, main page]

Skip to content
wwsheng009Public

About

yao project-init template

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

53 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yao-init

用于Yao安装器使用的Yao应用模板

YAO 应用

文档: https://yaoapps.com/doc

适用于 0.10.4 的 yao 应用程序

内置了json-schema检验,使用vscode编辑器,在编辑配置文件时会有自动的提示与字段说明。

注:需要vscode连接github

使用Typescript开发

在使用最新版本的yao进行开发时,可以使用ts脚本代替js脚本。这个项目模板已经配置好了ts脚本的开发所需要的必要配置,可以像其它nodejs项目一样使用调试功能。

npm i yarn -g
yarn

在高度项目之前,需要另开一个终端窗口执行以下命令。

yao start

0.10.4 开发版本的 yao 下载

Yao下载地址:

Linux:

https://github.com/wwsheng009/yao/releases/tag/yao-0.10.4

启动 yao

git clone --depth 1 https://github.com/wwsheng009/yao-init.git my-yao-app

cd my-yao-app

yao start

控制台会提示打开地址http://127.0.0.1:5099进行配置数据库连接

---------------------------------
Yao Application Setup v0.10.4
---------------------------------

Open URL in the browser to continue:

http://127.0.0.1:5099

不建议直接配置生产系统数据库

注意,只有执行目录下没有.env 文件并且数据库为空时才会出现配置界面。

配置成功后会跳转到后台登录页面,http://127.0.0.1:5099/admin/

默认管理员账号

账号 xiang@iqka.com
密码 A123456p+

环境变量

变量名称 说明 示例
YAO_ENV 服务模式 development 或 production development
YAO_HOST 服务监听地址 0.0.0.0 127.0.0.1
YAO_PORT 服务监听端口默认为 5099 5066
YAO_DB_DRIVER 数据库驱动 sqlite3 或 mysql sqlite3
YAO_DB_PRIMARY 数据文件过驱动 DSN db/yao.db
YAO_LANG 语言 en-us,zh-ch zh-cn
YAO_LOG 日志文件地址 ./logs/application.log
YAO_LOG_MODE 日志文件格式 TEXT 或 JSON JSON
YAO_SESSION_STORE 会话存储方式 file或 redis file
YAO_SESSION_FILE 会话文件地址 file或 redis db/.session
OPENAI_KEY OPENAI API KEY, 可在连接器中更换变量名。 启用 Neo 或 AIGC 必须。 sk-xxx
YAO_APP_PROXY_ENDPOINT 调试项目时需要配置yao服务地址。 http://localhost:5099/api/proxy/call
YAO_API_ACCESS_KEY 调试项目时需要配置的API key。 123456

详细文档说明

https://github.com/wwsheng009/yao-docs

About

yao project-init template

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0