Answer the question
In order to leave comments, you need to log in
How to add chat features in NodeJS?
Hello.
I have chat on NodeJS and SocketIO .
1) When you open his link, a white screen is displayed for a few seconds. How can I make it so that at this time an inscription is displayed that the script is being loaded?
2) How can you make it so that more than two people communicate in it?
3) How can I make it appear that another person is typing a message?
4) How can I add emoticons to it, or at least replace, for example, ":)" with a smiley?
I can provide all the source code if needed.
I will be glad to hear your comments.
Answer the question
In order to leave comments, you need to log in
1) The previous commentator answered you.
2) Look here https://github.com/alexbagirov/RealtimeChat/blob/m... you have a limitation here. Because of this, join does not occur on the server.
3) On the client side, hang an event listener on the field in which the user types text and handle keydown / keyup events, the logic is built from this.
4) When the text arrives at the client, analyze it with a regular expression and change, for example, ":)" to a picture.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question