【问题标题】:How to upload towerjs assets to S3?如何将 towerjs 资产上传到 S3?
【发布时间】:2012-07-19 09:59:45
【问题描述】:

在 towerjs 中将生产资产上传到 S3 的正确方法是什么? 我在 config/credentials.coffee 中配置了我的 S3 凭据

然后我尝试 cake assets:publish

得到

        /Users/avaranovich/projects/demos/node/firstApp/Cakefile:15
    client = knox.createClient(Tower.secrets.s3);
                                            ^
TypeError: Cannot read property 's3' of undefined
    at Object._this [as action] (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:15:45)
    at helpers.extend.invoke (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:42:26)
    at Object.action (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:9:12)
    at helpers.extend.invoke (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:42:26)
    at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:67:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/coffee-script/bin/cake:7:38)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

更新:我发现任务 assets:upload:s3 中的正确行应该看起来 客户端 = knox.createClient Tower.config.credentials.s3

然后我得到另一个错误

/Users/avaranovich/projects/demos/node/firstApp/node_modules/tower/lib/tower/server/application/assets.js:112
    _console.debug("Uploading to " + Tower.secrets.s3.bucket);
                                                  ^
TypeError: Cannot read property 's3' of undefined
    at Object.Tower.Application.Assets.upload (/Users/avaranovich/projects/demos/node/firstApp/node_modules/tower/lib/tower/server/application/assets.js:112:51)
    at Object._this [as action] (/Users/avaranovich/projects/demos/node/firstApp/Cakefile:16:37)

好像 Tower.secrets.s3.bucket 在其他地方硬编码。

谢谢, 安德烈

【问题讨论】:

    标签: towerjs


    【解决方案1】:

    我会坚持不懈,密切关注开发分支,甚至开始为自述文件中所述的要求做出贡献:https://github.com/viatropos/tower/tree/development

    他们的开发分支终于处于“功能完成”阶段,现在正在努力支撑它,以便解决错误并提高性能。

    请务必每天观看快速变化的路线图:https://github.com/viatropos/tower/blob/master/ROADMAP.md

    鉴于开发人员数量有限,发展速度相当惊人!我们需要全力支持这个项目。

    【讨论】:

    • 在帖子中添加了路线图。让我印象深刻的是,几乎每天或每隔几天就会看到更新真正推动我们向 .5 版本迈进,这是我们都需要真正开始在更严肃的层面上使用它的重要版本。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-05-10
    • 2015-12-01
    • 2021-08-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-22
    相关资源
    最近更新 更多