nextjs-socketio-demo
v0.0.0
Published
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.
Downloads
1
Readme
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
Clone this repo and
cd
into itInstall dependencies:
npm install
# or
yarn install
- 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