Can python/flask websites be hosted on firebase?

守給你的承諾、 提交于 2019-11-27 07:24:27

问题


I have a website that uses python/flask, and I know that firebase hosting is only for static websites, but I need to be able to use firebase cloud functions in my app, and that requires firebase hosting (please correct me if I am wrong). As node js is server side, but you can use it with firebase hosting, I was hopeful that there might be a way to use python too. Otherwise, if there is a way to use cloud functions without firebase hosting, you can tell me about that too.


回答1:


You don't need Firebase Hosting for using Firebase Functions, and as you mentioned Firebase Hosting is for static pages.

Firebase Functions are hosted on firebase (independent from Firebase Hosting for static pages), and currently don't support python.

For HTTP trigger Firebase Functions you simply make HTTP requests to your function's url, from any backend or from frontend itself.

Firebase DB/Storage and other trigger functions work in the same way, but don't explicitly call then they are triggered on specific events in DB/Storage etc. that you specify when defining functions.



来源:https://stackoverflow.com/questions/48040767/can-python-flask-websites-be-hosted-on-firebase

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