Skip to content

ezolla/twitch-chat-socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitch

Mock Twitch chat socket server


Project Inspiration

This project was inspired after watching a React mock interview by Theo with Dan Abramov. In this mock interview, Theo has created a socket server that replicates Twitch chat messages and challenges Dan to build the frontend in React to handle incoming messages in a chat-like interface. This sparked my interested in socket.io, so I decided to replicate the server.

Example Client Connection

Connects to chat server using socket running on port 4000.

const connectTwitchChat = () => {
  const socket = io('http://localhost:4000')

  socket.onAny((type, message) => console.log(type, message))

  return socket
}

useEffect(() => {
  const socket = connectTwitchChat()

  return () => {
    socket.disconnect()
  }
}, [])

About

Mock Twitch chat socket server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published