在Google Cloud Function或AWS Lambda上部署Universal Angular [英] Deploying Universal Angular on Google Cloud Function or AWS Lambda
问题描述
尝试Angular 2时,我碰巧请参阅Angular Universal.这是服务器端渲染的Angular 2应用程序与ReactJs中的相同. 此处.
While experimenting with Angular 2, I happened to see Angular Universal. It's Server-side Rendering for Angular 2 apps same like we have in ReactJs. There is also a getting started guide with one code snippet here.
我试图了解是否可以在无服务器环境(例如Google Cloud Function或AWS Lambda)中部署此功能.这两个服务的文档都表明支持nodejs.我对Angular2和amp;无服务器托管模式.
I am trying to understand if this is something we can deploy in serverless environment like Google Cloud Function or AWS Lambda. Docs of both services indicates that nodejs is supported. I am very new to both Angular2 & serverless hosting pattern.
推荐答案
可以在无服务器环境中部署Angular应用.我可以说更多,服务器端渲染(Angular Universal)是可能的.
It is possible to deploy Angular app on serverless environment. I could say more, it is possible with server-side rendering (Angular Universal).
查看此样板仓库: https://github.com/maciejtreder/angular-universal-pwa
和现场演示: https://www.angular-universal-pwa.maciejtreder.com
该应用使用无服务器框架进行部署: https://serverless.com
The app is deployed using Serverless framework: https://serverless.com
这篇关于在Google Cloud Function或AWS Lambda上部署Universal Angular的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!