1
votes

I deploy the Socket.io Official Chat application on Firebase, but it always show https://.firebaseapp.com/socket.io/ [HTTP/1.1 404 Not Found] in the console. How to fix this problem?? And It works on my local machine http://localhost:3000

Should I change var http = require('http').Server(app); to var http = require('https').Server(app); Because Firebase Hosting is SSL-only.

Any help would be much appreciated. Best Regards.

1

1 Answers

4
votes

Firebase Hosting is for static assets only. You cannot run your own node scripts on its servers. This means there is no way to run the socket.io chat app on Firebase Hosting.

Fun fact: Firebase also offers a real-time database, which can be used to very easily build a chat application. Have a look at the interactive tutorial to get a feel for it.