是否可以在Firebase Hosting上托管express和socket.io应用程序? [英] Is it possible to host a express and socket.io app on Firebase Hosting?

查看:105
本文介绍了是否可以在Firebase Hosting上托管express和socket.io应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经关注Firebase云功能已有一段时间了.最近,我在Firebase Hosting上遇到了托管Node.js应用程序的问题,但它只是使用express.

I've been following Firebase cloud functions for a while now. Recently I came across hosting Node.js apps on Firebase Hosting, but it was using just express.

我们可以在Firebase上托管socket.io应用程序吗?

Can we host socket.io apps on Firebase?

推荐答案

此处的Firebase员工

即使将Firebase Hosting连接到Cloud Functions以提供后端,这对于Firebase Hosting也是不可能的.

This is not possible with Firebase Hosting, even if it's hooked up to Cloud Functions to provide a backend.

如果要在客户端之间进行实时套接字通信,请考虑使用Realtime Database作为客户端之间的管道.这样您将完成更多工作,编写更少的代码,并且更容易扩展.

If you want realtime socket communication between clients, consider using Realtime Database as a conduit between them. You'll get more done, write less code, and scale easier this way.

这篇关于是否可以在Firebase Hosting上托管express和socket.io应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆