Deploying Universal Angular on Google Cloud Function or AWS Lambda

爱⌒轻易说出口 提交于 2019-12-04 21:04:23

问题


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.

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.


回答1:


It is possible to deploy Angular app on serverless environment. I could say more, it is possible with server-side rendering (Angular Universal).

Check out this boiler-plate repo: https://github.com/maciejtreder/angular-universal-pwa

and live demo: https://www.angular-universal-pwa.maciejtreder.com

The app is deployed using Serverless framework: https://serverless.com




回答2:


Don't think so. It says you need to use angular2+webpack and that starter guide says it requires node version => 5. AWS lambda supports only 4.3.2.

Don't know about google functions.



来源:https://stackoverflow.com/questions/40282468/deploying-universal-angular-on-google-cloud-function-or-aws-lambda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!