Is it possible to host a express and socket.io app

2019-08-19 03:47发布

问题:

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.

Can we host socket.io apps on Firebase?

回答1:

Firebase employee here

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

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.