gpt4 book ai didi

使用 settings.json 构建 Meteor

转载 作者:行者123 更新时间:2023-12-01 09:50:27 25 4
gpt4 key购买 nike

我已经用 meteor build ../build 构建了我的第一个 Meteor APP。

但是,当我使用 node main.js 启动我的应用程序时,我出错了,因为 Meteor 搜索了我的 settings.json 中的信息,但找不到此信息。

您知道设置是否已构建吗?

谢谢大家,

最佳答案

填充环境变量

export METEOR_SETTINGS="$(cat /path/to/settings.json )"

在构建步骤之后和执行代码之前

确认您的 json 是有效问题

echo "$METEOR_SETTINGS" | jq .

使用 command line utility jq

这里是 env var METEOR_SETTINGS 的编辑内容(与/path/to/settings.json 相同)

echo $METEOR_SETTINGS | jq .

{
"public": {
"rootUrl": "https://example.com",
"secure": true,
"minSearchChars": 2,
"supportEmail": "support@coolstartup.com",
"fromUser": "support@example.com",
"GcmSender": 8577956,
"maxBodySize": 15,
"cordovaHost": "http://localhost:12416",
"failedAuthsLimit": 5
},
"environ": {
"enduserUrl": "https://example.com",
"adminUrl": "https://admin.example.com",
"scanUrl": "example.com:3310",
"scanTries": 4,
"opsCheckToken": "foobaroJ1b3UOi",
"bootstrapUser": {
"name": "Server Daemon",
"email": "daemon@coolstartup.com",
"password": "123123"
},
"pollingTries": 5,
"expireResetToken": 1,
"expireEnrollToken": 8,
"fromUser": "support@example.com",
"replyTo": "support@coolstartup.com"
},
"notifs": {
"apn": {
"expiry": 1123200,
"production": false,
"appName": "app"
},
"gcm": {
"timeToLive": 1123200
}
},
"vidyoyoyoyo": {
"key": "f6acfc0ea9d ",
"appID": "d06eec.o.io",
"userName": "foo@bar.com",
"expiresInSeconds": 10000
},
"logLevel": 4,
"jsonSpaces": 0
}

关于使用 settings.json 构建 Meteor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38816123/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com