-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeekapk.example.ini
42 lines (36 loc) · 1.59 KB
/
geekapk.example.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## Tips: GeekApk Crystal 服务器使用 Crystal 内建的 INI 解析器,这个解析器不支持 gem inifile 扩展的语法。 ##
## 如果出现无法解析配置文件的情况,删除所有注释和字符串双引号,保证只有标准 INI Section, Key=value 语法。 ##
## Ruby 使用 ruby -e "require 'inifile';pp(IniFile.load 'geekapk.ini').instance_variable_get :@ini" 查看解析结果 ##
## Crystal 使用 crystal eval 'require "ini";pp INI.parse(File.read "geekapk.ini")' 查看解析结果 ##
# Kemalcr Web 框架的便利设置
[kemal]
logging = false ; 记录请求日志?
mode = production ; 运行模式? development|test|production
# 服务相关设置
[server]
host = 0.0.0.0 ; 主机位置,一般设置为 127.0.0.1(本机) 或 0.0.0.0(公开服务)
port = 233 ; WebAPI 端口
ssl_cert = "" ; OpenSSL 证书 为空不使用 SSL
ssl_key = "" ; OpenSSL 密钥
# MySQL 数据库连接, 可能会覆盖手动 DATABASE_URL 环境变量设置
[database]
host = 127.0.0.1
port = 3306
username = geekapk
password = dolphins
# 元数据
[meta]
name = "GeekApk Main Server" ; 名称?
desc = "geekapk.com 提供的 API 服务器,默认 GeekApk API 服务" ; 描述
authors = "1 2 3" ; 以 ' ' 划分的整形数组,该服务中有效的用户 ID
# 杂项设置
[misc]
allow_newuser = true ; 允许注册
ip_spamchk = true ; 使用基于 IP 的频率限制
ipheader = X-Forwarded-For
revproxy = false ; 使用请求头中的 ${ipheader} 参数作为访客 IP
# 特殊应用/分类设置
[special]
app_news = 1 ; 新闻应用 ID
cate_albums = 1 ; 应用集分类
cate_topics = 2 ; 话题分类