首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在亚马逊云前端部署ReactJS应用

在亚马逊云前端部署ReactJS应用
EN

Stack Overflow用户
提问于 2018-08-24 08:16:57
回答 1查看 251关注 0票数 0

我有一些关于在云端部署React应用程序的问题。

如何缓存和更新托管在Cloud front上的前端网站?

代码语言:javascript
复制
When I upload a new files to the bucket I will see the changes IMEDIATELY after accessing the site again? If not, how long it will take?
I need to make an invalidate request to see the changes working on the website? If yes, how long it will take?

在Cloud Front中处理单页应用的缓存和更新的最佳方法是什么?(我正在使用React应用程序和Webpack)

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-08-24 08:30:32

您需要做的是清除存储桶的缓存或使文件“无效”。

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html

因此,安装aws cli并运行以下命令:

aws cloudfront create-invalidation --distribution-id $CDN_DISTRIBUTION_ID --paths "/*"

我建议您使用您的S3存储桶进行开发。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51995890

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档