prabhasha2006 / chat-application

chat app by socket.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chat App by socket.io

From EveloCore

Requirements

Nodejs

npm packages

"express": "^4.18.2"

"http": "^0.0.1-security"

"socket.io": "^4.7.2"

About this

  • ✓ Simple inbox chat
  • ✓ Listen to server chat
  • ✓ Notifications

Easy Installation

Get started with npm installation:

npm install

Run ./index.js:

npm run start

Setup manually

Get started with npm installation:

npm i express
npm i socket.io
npm i http

Run ./index.js:

node index.js

Small code snippet examples

emit to server-message

socket.emit('server-message', 
    { 
        from : emits.value || "a",
        to: listens.value || "b",
        isOnServer: onServer,
        message: msg
    }
)

listen to client-message

socket.on('client-message', (data) => {
  console.log(data)
}

  

About

chat app by socket.io

License:MIT License


Languages

Language:JavaScript 56.9%Language:CSS 28.8%Language:HTML 14.3%