No mode found: dev

部署shakespeare1279 次浏览

linux 运行web程序(windows下没问题,开发在windows下。),总是报这个错误,配置文件没问题,都是参考例子来的,或者直接用例子。

运行的模式指定的是 -runMode dev

编译的环境是:goos=linux, goarch=amd64

看了revel.go源代码,说是配置里没有dev这个section.可以明明配置了的。

配置文件app.conf内容:

app.name=i18n
app.secret=bPlNFGdSC2wd8f2QnFhk5A84JJjKWZdKH9H2FHFuvUs9Jz8UvBHv3Vc5awx39ivu
http.addr=
http.port=9000
cookie.prefix=REVEL

# The language cookie name used to store the current language.
i18n.cookie=%(cookie.prefix)s_LANG

# The default language of this application.
i18n.default_language=en

[dev]
mode.dev=true
results.pretty=true
results.staging=true
watch=true

#module.testrunner = github.com/revel/modules/testrunner
module.static=github.com/revel/modules/static

log.trace.output = stdout
log.info.output  = stderr
log.warn.output  = stderr
log.error.output = stderr

[prod]
mode.dev=false
results.pretty=false
results.staging=false
watch=false

module.testrunner =

log.trace.output = off
log.info.output  = off
log.warn.output  = %(app.name)s.log
log.error.output = %(app.name)s.log

 

共0个回复