DEV Community

Cover image for Creating Your Own Chat Room with React, Node, Socket.io and the Cloud: Part 2

Creating Your Own Chat Room with React, Node, Socket.io and the Cloud: Part 2

Bradston Henry on May 07, 2021

In this blog, we will complete everything we need to get our Chat Room up in running. In part 1, we focused on creating the socket.io NodeJs Ser...
Collapse
 
richardwright78 profile image
richardwright78

Thanks for this great tutorial. This is helping me greatly as I'm starting out developing a virtual events platform.

Think you need to update the repo as there's no public/index.html and this is needed to run the app locally. Also, My app mostly works but doesn't display that a user has entered the room, just 'You appear as User1 in chat', and the user appears to be the same when entering on different browsers.

Collapse
 
krishnathota profile image
Krishna Thota

I am trying to create a chat app with multiple users who can chat 1-1 with each of them. Is there a simple way to handle it using socket.io?

Collapse
 
bradstondev profile image
Bradston Henry

Thats a great question @krishnathota .

What you want to do is investigate "Rooms" in socket.io. Here is a link to the documentation: socket.io/docs/v3/rooms/

What you may want to do is have a "lobby" area where users land on before connecting to the chat room. You can enable users to "host" chat rooms and generate a room for only the person(s) they want to chat with.

There are a few ways you could approach it but one way would be to have rooms assigned a specific id that only the host would know and then would have to share with their desired participants (think of how Zoom handles meetings).

I made a chat app with rooms and I would like to share my setup on how I did it but it may be a while before I get a change to write up the blog but it is on my list.

Hope that was helpful in some way!

Collapse
 
madhurasail profile image
Madhura S

If I am creating an application using flutter and node JS, how can i deploy that app to ibm cloud?

Collapse
 
bradstondev profile image
Bradston Henry

Hey Madhura. I've actually never used Flutter before but I'm going to take some time to see if I can learn Flutter and deploy it and get you an answer before the end of this week.

In regards to Node, you can actually check out part 1 of this blog under the "Deploying your Socket NodeJS Server to the Cloud" and follow those steps on how to deploy a Node app to IBM Cloud.

Collapse
 
bradstondev profile image
Bradston Henry

Good News!! 😎 I was able to figure it out! It's very very easy to do.

I'm going to create a quick blog with the steps on how to deploy a Flutter Web app so you can have a reference to basics steps.

Hopefully I'll have it up in the next 24 hours.

Thread Thread
 
bradstondev profile image
Bradston Henry

Hey Madhura,

Went ahead and made the blog post on how to deploy a basic Flutter app in IBM Cloud:

Hope this helps. 😁 You can probably just skip down to the Deployment section of the blog as I discuss the basic steps of how to create a Flutter app.

Collapse
 
codeboi profile image
Timothy Rowell

Could you help me with my socket.io chat?

Collapse
 
bradstondev profile image
Bradston Henry

Hi IVgamers, Are you needing help with following the steps in this blog or help in some other way with socket?

Collapse
 
codeboi profile image
Timothy Rowell

"other way with socket?" yes

Collapse
 
codeboi profile image
Timothy Rowell