How to create chat application using node.js and socket.io

Hello Friends this is my first post because i recently booked this domain, So i am going to introduce you a basic chat app in nodejs and socket.io

I heared lot’s of about nodejs, So i started working on node but i was very confuse what should i make Β first that useful for me as well as others, Then finally i decided to create a realtime chat app to feel realtime experience.


I am not going to show you the brief description of coding part as of now because of less time, I am very sorry for that. But if you have little knowledge about nodejs then you can understand my code. Because i have written very basic level of code in node so you can easily understand.

Technology i used: nodejs, socket.io, jquery, bootstrap
heroku-9

How it works: it is very simple app no registration required. You just need to login with your nick name and can start chat.

There is a two main features in this app 1st one is group chat, Where all online users can chat together in a group and 2nd one is private chat just click on online’s user name and can start chat.

IF no one is online except you for that case you can click on your name under online users section and test how it works..!!

If you like this post please don’t forget to subscribe My Public Notebook for more useful stuff.

13 Replies to “How to create chat application using node.js and socket.io”

  1. I do believe all the concepts you’ve introduced to your post.
    They are very convincing and will definitely work.
    Still, the posts are too short for novices. May you please lengthen them a bit from subsequent time?

    Thank you for the post.

  2. I have download node js chat source code but its not working on my local system socket.io js not found.

    Please give me suggestion what should i do.

  3. Hi,Rohit i am very happy to your hard work and good ideas about your chatapp and uses new technology like Node js. ,
    I would like to use your code in .NET Technology but i am getting error like socket.io in jsfile, i m also confused can we chat in localhost.please give me solution for that.i am waiting for your response plz notify me. Thanks for your valuable.

  4. hi rohit.

    thank you for this demo.
    i had installed it on my localhost. however i can’t get into the chatroom. everytime i key in username, it return back to the same page.there are 2 errors in the console.

    Uncaught ReferenceError: require is not defined (socket.io.js)

    Uncaught ReferenceError: io is not defined (custom.js)

    what is the right way to install this demo on localhost?

    thank you.

  5. Script is not working on my local machine it displays just a feedback form only. πŸ™

  6. hi sir that’s really good tutorial . i really liked but i have a confusion how can i host this node.js website on my windows server and how web.js automatically start like your app on server please explain

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.