修改leannote配置文件

本文详细介绍了Leanote笔记应用的配置文件app.conf的设置方法,包括HTTP地址、端口、站点URL、管理员用户名、MongoDB数据库配置、应用密钥、Revel框架配置等关键参数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

注意标红色的行

cd /usr/local/leanote/gopackage/src/github.com/leanote/leanote/conf

vi app.conf

 

#------------------------
# leanote config
#------------------------

http.addr=0.0.0.0 # listen on all ip addresses
http.port=80

site.url=http://localhost:80
#site.url=http://localhost:9000 # or http://x.com:8080, http://www.xx.com:9000

# admin username
adminUsername=admin

# mongdb
db.host=127.0.0.1
db.port=27017
db.dbname=leanote # required
db.username=root # if not exists, please leave it blank
db.password=abc123 # if not exists, please leave it blank
# or you can set the mongodb url for more complex needs the format is:
# mongodb://myuser:mypass@localhost:40001,otherhost:40001/mydb
# db.url=mongodb://root:root123@localhost:27017/leanote
# db.urlEnv=${MONGODB_URL} # set url from env. eg. mongodb://root:root123@localhost:27017/leanote

# You Must Change It !! About Security!!
#app.secret=V85ZzBeTnzpsHyjQX4zukbQ8qqtju9y2aDM55VWxAH9Qop19poekx3xkcDVvrD0y #
app.secret=MCHZzBeTnzpsHyjQX4zukbQ8qqtju9y2aDM55VWxAH9Qop19poekx3xkcDVvrD0y

#--------------------------------
# revel config
# for dev
#--------------------------------
app.name=leanote
http.ssl=false
cookie.httponly=false
cookie.prefix=LEANOTE
cookie.domain= # for share cookie with sub-domain
cookie.secure=false
session.expires=3h # 3 hour. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
format.date=2006-01-02
format.datetime=2006-01-02 15:04:05 # 必须这样配置
results.chunked=false

log.trace.prefix = "TRACE "
log.info.prefix  = "INFO  "
log.warn.prefix  = "WARN  "
log.error.prefix = "ERROR "

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

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

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

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

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

[prod]
mode.dev=false
results.pretty=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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值