This commit is contained in:
yumoqing 2025-10-22 14:15:57 +08:00
parent bb22ed27cf
commit d1d74f55d0
5 changed files with 86 additions and 0 deletions

12
app/example.py Normal file
View File

@ -0,0 +1,12 @@
from ahserver.serverenv import ServerEnv
from ahserver.webapp import webapp
def get_module_dbname(module_name):
return 'test'
def init():
env = ServerEnv()
env.get_module_dbname = get_module_dbname
if __name__ == '__main__':
webapp(init)

64
conf/config.json Executable file
View File

@ -0,0 +1,64 @@
{
"password_key":"!@#$%^&*(*&^%$QWERTYUIqwertyui234567",
"logger":{
"name":"example",
"levelname":"info",
"logfile":"$[workdir]$/logs/example.log"
},
"filesroot":"$[workdir]$/files",
"databases":{
"test":{
"driver":"mysql",
"kwargs":{
"user":"test",
"db":"test",
"password": "XXX",
"host":"localhost"
}
}
},
"website":{
"paths":[
["$[workdir]$/wwwroot",""]
],
"client_max_size":10000,
"host":"0.0.0.0",
"port":8080,
"coding":"utf-8",
"indexes":[
"index.html",
"index.tmpl",
"index.ui",
"index.dspy",
"index.md"
],
"startswiths":[
{
"leading":"/idfile",
"registerfunction":"idfile"
}
],
"processors":[
[".ws","ws"],
[".xterm","xterm"],
[".proxy","proxy"],
[".llm", "llm"],
[".llms", "llms"],
[".llma", "llma"],
[".xlsxds","xlsxds"],
[".sqlds","sqlds"],
[".tmpl.js","tmpl"],
[".tmpl.css","tmpl"],
[".html.tmpl","tmpl"],
[".bcrud", "bricks_crud"],
[".tmpl","tmpl"],
[".app","app"],
[".bui","bui"],
[".ui","bui"],
[".dspy","dspy"],
[".md","md"]
],
"session_max_time":3000,
"session_issue_time":2500
}
}

3
files/README.md Normal file
View File

@ -0,0 +1,3 @@
# 系统文件存放目录
用户上传文件都放在这里

3
logs/README.md Normal file
View File

@ -0,0 +1,3 @@
# 系统运行日志
根据conf/config.json文件的配置这里存放系统运行的日志文件

4
wwwroot/README.md Normal file
View File

@ -0,0 +1,4 @@
# 服务器根目录
前台的ui文件和dspy文件都放在这里可以按照需要创建子目录
bricks包的dist目录下的内容要放在这里