在 Ghost 0.x 中,配置是通过单个 config.js 文件提供的,其中包含每个 env 的密钥。
在 Ghost 1.0 中,通过多个 config.json 文件提供配置
在 Ghost 1.0 中如何提供环境变量?
我想像这样在 Cloud9 IDE 上使用 process.env.port 动态设置端口值。
config.development.json
{
"url": "http://localhost",
"server": {
"port": process.env.port,
"host": process.env.IP
}
}
当我使用ghost start
以下配置运行应用程序时,它说您可以在http://localhost:2368访问您的出版物,但是当我转到http://c9.io中的http://localhost:2368时,它给了我一个错误说没有应用程序似乎在这里运行!
{
"url": "http://localhost:2368",
"server": {
"port": 2368,
"host": "127.0.0.1"
}
}