Posts by samuel santiago • 19 points
4 posts
-
0
votes1
answer75
viewsA: What are the best practices for implementing Socket.io?
First, you would need a variable with users connected to the server: const users = {} Then you need an id for each person when they enter: In the client (the name variable can be a prompt or an…
-
0
votes0
answers24
viewsQ: I want to pass JS variables to an EJS file, how can I do this?
I’ve been trying to chat, and the client’s username is on req.session client. And to show the user’s number in the corner of the screen, I need to take this user’s variable, for this, in index.js I…
-
-2
votes1
answer28
viewsQ: Update array without having to wait for another user to log in
I am chatting with Node.js and socket.io, I have an error in listing the values of an array, the array of users. I put a <ul></ul> with an id and nothing else. follow the prints below…
-
0
votes0
answers32
viewsQ: How do I tidy up this list of values from an array?
I am chatting with Node.js and socket.io, I have an error in listing the values of an array, the array of users. I put a <ul></ul> with an id and nothing else. follow the prints below…