平台介绍 >> /jscode/app.json 项目配置文件(WEB模式)
/jscode/app.json 项目配置文件(WEB模式)
{
"cros_desc": "跨域配置",
"cros": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Headers": "Content-Type,X-Requested-With,*",
"Access-Control-Expose-Headers": "*"
},
"log": {
"writesql_desc": "是否记录执行等SQL语句",
"writesql": false,
"writesqlfile": "sqllog",
"logtype": "console",
"logtype_desc": "日志显示类型,console,file",
"loglevel": "debug",
"loglevel_desc": "记录等级,error,log,debug,",
"enable_consolelog": true
},
"static_desc": "静态本地目录",
"static": [
{
"alias": "/res/",
"path": "$JSCODEPATH$/static"
},
{
"alias": "/admin/",
"path": "$JSCODEPATH$/CCadmin"
}
],
"setting": {
"debuginfo_desc": "如果返回是JSON结果,数据加入debugInfo信息",
"debuginfo": false,
"template_desc": "HTML解析模板,左边有右边标识, 默认为{{ 和 }}",
"templatedelims_left": "",
"templatedelims_right": "",
"urlrouter_desc": "是否启用URL路由",
"urlrouter": true
},
"session": {
"cookiename_desc": "Session在客户端等COOKIE名称",
"cookiename": "goSessionID",
"timeoutsecond_desc": "session失效时间,单位秒",
"timeoutsecond": 36000,
"gchour_desc": "session资源回收周期:单位小时",
"gchour": 10
},
"globalcache": {
"globalcache": "应用内全局缓存",
"gchour_": "session资源回收周期:单位小时",
"gchour": 10
},
"cache_redis": {
"cache_redis": "redis配置",
"addr": "127.0.0.1:6379",
"password": "",
"db": 0
},
"timeout_desc": "超时配置,单位:毫秒",
"timeout": {
"async_desc": "异步超时",
"async": 3000,
"crond_desc": "定时任务",
"crond": 2000,
"event_desc": "事件",
"event": 2000,
"init_desc": "初始化",
"init": 2000,
"request_desc": "请求",
"request": 20000
}
}