Web Socket Express is a small real-time collaboration demo built with Express and Socket.IO. It synchronizes draggable circles across connected clients to demonstrate the basics of event-driven, multi-user state updates in the browser.
- Express server with Socket.IO integration
- Real-time broadcasting for create and move events
- Shared browser canvas for multi-client interaction
- Minimal codebase that is easy to study and extend
- Node.js
- Express
- Socket.IO
Each client opens the shared page, creates circles, and drags them within the bounded area. The server listens for circleAdded and circleMoved events, then broadcasts those updates to other connected clients.
app.js: Express and Socket.IO serverpublic/index.html: browser UI and client-side socket logic
- Node.js
- Install dependencies:
npm install- Copy the environment template:
cp .env.example .env- Start the development server:
npm run dev- Open the app in your browser:
http://localhost:3000
PORT: HTTP port for the Express server
npm run dev
npm startNo automated tests are included yet.
Current validation is done through local multi-tab or multi-browser testing to confirm that create and move events are synchronized correctly.
- Persist shapes between sessions
- Add user presence indicators
- Support more shapes and colors
- Move client code into separate JS and CSS assets
- Add automated socket integration tests
No license has been specified yet.
Developed by Ali Balash.