在firebase云端功能中运行puppeteer代码(running puppeteer code in firebase cloud functions)

编程入门 行业动态 更新时间:2024-10-24 08:23:19
在firebase云端功能中运行puppeteer代码(running puppeteer code in firebase cloud functions)

我正在开发一个个人项目,该项目是一个应用程序,用户可以输入他们的地址和信用卡信息,然后单击按钮为我常去的大学之一购买停车许可证。

我想将我的前端托管在Firebase的云存储中,并且我想创建一个云端函数,其中puppeteer代码可以与我保存到Firebase实时数据库的信息一起运行。

firebase云端功能可以运行购买停车许可证的木偶代码吗?

由于puppeteer不支持云端功能,我可以使用heruoku来承载木偶编码吗?

I'm working on a personal project which is an app where an user can input their address & credit card info and click a button to buy a parking permit for one of the university that I visit often.

I want to host my front end in firebase's cloud storage and I want to create a cloud function where puppeteer code can run with the information that I save to the firebase's realtime database.

Is it possible for firebase cloud function to run puppeteer code that buy a parking permit?

Since puppeteer doesn't work with cloud functions, can I use heruoku to host the puppeteer code?

最满意答案

目前无法将Puppeteer与Cloud Functions结合使用,因为运行部署代码的服务器实例缺少Puppeteer所需的共享库。 你可以在这个GitHub问题中阅读 。 也看到这个问题 。

It's currently not possible to use Puppeteer with the Cloud Functions node 6 runtime because the server instances that run deployed code are lacking a shared library that's required by Puppeteer. You can read about that in this GitHub issue. Also see this issue.

As of the node 8 runtime release, the required libraries for puppeteer are available.

更多推荐

本文发布于:2023-08-03 14:08:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1390749.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:云端   代码   功能   puppeteer   firebase

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!