This folder contains examples of real-time web applications built using WebSockets with Node.js and Express.js. These examples demonstrate how to implement real-time communication between the server and clients.
- Description: A web app that sends real-time notifications to connected clients. Notifications are triggered by server-side events and displayed instantly on the client.
- How to Run:
- Navigate to the
real-time-notificationsfolder. - Install dependencies:
npm install
- Start the server:
node index.js
- Open your browser and navigate to
http://localhost:3000.
- Navigate to the
- Description: A web app that tracks stock prices in real-time. The server sends updated stock prices to all connected clients, and the data is displayed dynamically on the client.
- How to Run:
- Navigate to the
stock-trackerfolder. - Install dependencies:
npm install
- Start the server:
node index.js
- Open your browser and navigate to
http://localhost:3000.
- Navigate to the
- Node.js installed on your machine.
- Each example uses WebSockets for real-time communication.
- Static assets (e.g., JavaScript, CSS) are located in the
publicfolder of each app. - View templates are located in the
viewsfolder of each app. - These examples are for demonstration purposes and do not include advanced features like authentication or persistent storage.