redbaron76 / nextjs-socketio-chat

Realtime Chat App in Next.js and Socket.io

Home Page:https://codesandbox.io/s/nextjs-socketio-chat-piffv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a simple realtime chat example that demonstrates how to setup a Socket.io server in Next.js as an API route end-point.

Getting Started

  1. Clone this repo and cd into it

  2. Install dependencies:

npm install
# or
yarn install
  1. Run the development server:
npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

How it works

Open multiple browser windows and start a chat to see it in action.

Caveats

This example doesn't run in a serverless environment. A running server instance is still needed.

Check a DEMO

Check the code and test this example in Codesandbox

About

Realtime Chat App in Next.js and Socket.io

https://codesandbox.io/s/nextjs-socketio-chat-piffv


Languages

Language:TypeScript 90.8%Language:JavaScript 9.2%