Skip to content
Sign upLog in
← Back to Community

Chat, Chat, Chat!

Profile icon
RoyalCoder1234

If you want to chat, then use this program. It has time of message, when someone joins, and own username. It is my first Node.js app that I completed. If you want me to add something, comment and tell me. Hope you like it! Thank you for checking this out! You need to open up the shell by pressing ctrl+shift+s, and typing "node index.js" inside it. Press enter once you've typed it.

I used Express and Socket.io for the server side, and p5.js and Native JS for the client side.

Voters
Profile icon
jens123641
Profile icon
RoyalCoder1234
Comments
hotnewtop
Profile icon
jens123641

Well done :D

Profile icon
[deleted]

image

Profile icon
[deleted]

it didn't work ofr me?

Profile icon
RoyalCoder1234

@idrgplayer
Oh sorry. I forgot to mention that you need to open up the shell by pressing ctrl+shift+s, and typing "node index.js" inside it. Press enter once you've typed it. Sorry again about the confusion!

Profile icon
[deleted]

@RoyalCoder1234
a tip is maybe when the enter the message it clears the input box. Just to prevent spamming like I did xD

Profile icon
[deleted]

@RoyalCoder1234
i want to learn the code and understand, if you can, can you teach me

Profile icon
RoyalCoder1234

@idrgplayer
Woah, um, I'll try
@idrgplayer
, but what part to do you want to learn?

Profile icon
RoyalCoder1234

@RoyalCoder1234
Also, the time will be correct because the program adds the time based on your time schedule.

Profile icon
[deleted]

@RoyalCoder1234
the server part.

Profile icon
RoyalCoder1234

@idrgplayer

Server Dependencies

First you need to get the dependencies and the package.json file. You will open the shell through ctrl+shift+s. You want to type and do npm init first. You can search that up on youtube, but npm install is a bit harder. After npm init, you will type npm install express socket.io. That should give your dependencies and packages. You would have a package.json file and package-lock.json.

Profile icon
[deleted]

@RoyalCoder1234
dude can I invite you to my practice repl.