- 1、本文档共8页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Revel 配置⽂件app.conf
Revel 配置⽂件概述
app.conf 是Revel程序的配置⽂件,它使⽤ goconfig 语法,类似微软的 INI ⽂件。
下⾯是个例⼦:
=chat
app.secret=pJLzyoiDe17L36mytqC912j81Pf iolHm1veQK6Grn1En3YFdB5lvE
http.addr=
http.port=9000
[dev]
results.pretty=true
watch=true
log.trace.output = off
.output = stderr
log.warn.output = stderr
log.error.output = stderr
[prod]
results.pretty=false
watch=false
log.trace.output = off
.output = off
log.warn.output = %()s.log
log.error.output = %()s.log
每个段是⼀种 运⾏模式。最上⾯的 key (不 任何段内)对所有的运⾏模式有效。这使
得默认值 所有模式中适⽤,并且根据需要被重写。[prod] 段仅⽤于 ⽣产 模式。
新建的Revel程序中默认定义了 dev 和 prod 模式, 你也可以⾃定义你需要的段。 程序
启动时,根据 (命令⾏⼯具)“revel run” 提供的参数来选择运⾏模式。
⾃定义属性
开发者可以⾃定义key ,并通过 revel.Config 变量 访问它们。这⾥公开了⼀些简
单的 api 。
内建属性
应⽤程序设置
应⽤程序名称,⽤于控制台输出和开发web页。
例如:
= Booking example application
默认值: ⽆值
app.secret
密钥⽤于密码操作 (revel.Sign) 。Revel 内部使⽤它签署session cookies 。设置为
空将禁⽤签名。
使⽤ revel new新建项⽬时,它被设置为⼀个随机的字符串。
例如:
app.secret = pJLzyoiDe17L36mytqC912j81Pf iolHm1veQK6Grn1En3YFdB5l
默认值: ⽆值
HTTP settings
http.port
监听端⼜
例如:
http.port = 9000
http.addr
监听ip地址
Linux 中, 空字符串代表通配符 – indows中, 空字符串被转换为 localhost
默认值: ””
harness.port
Specifies the port for the application to listen on , when run by the harness. For example ,
when the harness is running , it will listen on http.port, run the application
on harness.port, and reverse-proxy requests. ithout the harness, the application
listens on http.port directly .
默认情况下,会选择⼀个随机的空闲端⼜。这仅仅是必要的,由该程序限制插座访问
的环境中运⾏时设置。By default , a random free port will be chosen . This is only
necessary to set when running in an environment that restricts socket access by the program .
Default: 0
http.ssl
如果为真, Revel eb服务器将⾃⾏配置为接受SSL连接。这需要⼀个 X509 证书和⼀
个 key ⽂件。
默认值: false
http.sslcert
指定 X509 证书⽂件的路径
默认值: ””
http.sslkey
指定 X509 证书 key的路径
默认值: ””
响应结果
results.chunked
确定模板渲染时是否使⽤ 分块编码。分块编码可以减少发送到客户端的第⼀个字节的
时间 ( 整个模板已经完全呈现数据之前)。
默认值: false
result
您可能关注的文档
- 第十章 Juniper网络防火墙配置手册-全-说明书.docx
- 第十章 JVC EX-A10.pdf
- 第十章 JVC UX-G68 微型组合音响 使用说明书.pdf
- 第十章 JVM GC -调优总结.pdf
- 第十章 JVM百问百答-电子书.pdf
- 第十章 JVM内存管理.ppt
- 第十章 JVM调优总结.doc
- 第十章 JWD咨询公司项目管理局域网网站项目(项目启动、项目规划).ppt
- 第十章 JWK-62T技术手册.pdf
- 第十章 JX-300x(新).ppt
- 2024年江西省寻乌县九上数学开学复习检测模拟试题【含答案】.doc
- 2024年江西省省宜春市袁州区数学九上开学学业水平测试模拟试题【含答案】.doc
- 《GB/T 44275.2-2024工业自动化系统与集成 开放技术字典及其在主数据中的应用 第2部分:术语》.pdf
- 中国国家标准 GB/T 44275.2-2024工业自动化系统与集成 开放技术字典及其在主数据中的应用 第2部分:术语.pdf
- GB/T 44285.1-2024卡及身份识别安全设备 通过移动设备进行身份管理的构件 第1部分:移动电子身份系统的通用系统架构.pdf
- 《GB/T 44285.1-2024卡及身份识别安全设备 通过移动设备进行身份管理的构件 第1部分:移动电子身份系统的通用系统架构》.pdf
- 中国国家标准 GB/T 44285.1-2024卡及身份识别安全设备 通过移动设备进行身份管理的构件 第1部分:移动电子身份系统的通用系统架构.pdf
- GB/T 44275.11-2024工业自动化系统与集成 开放技术字典及其在主数据中的应用 第11部分:术语制定指南.pdf
- 中国国家标准 GB/T 44275.11-2024工业自动化系统与集成 开放技术字典及其在主数据中的应用 第11部分:术语制定指南.pdf
- 《GB/T 44275.11-2024工业自动化系统与集成 开放技术字典及其在主数据中的应用 第11部分:术语制定指南》.pdf
文档评论(0)