Skip to content

Proof of concept that a nextjs frontend can effectively communicate with a express server and mqtt broker running in docker.

License

Notifications You must be signed in to change notification settings

theisaaclloyd/mqtt-rapid-updates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-time Update Proof of Concept

graph TD
    A[Frontend] -->|WebSocket| B(MQTT Broker)
    A -->|HTTP| C(Express Server)
    C -->|Publish| B
    B -->|Subscribe| A
Loading

Overview

This project demonstrates a simple real-time update system using MQTT for messaging and Express for HTTP requests.

Setup

  1. Install Docker and Docker Compose
  2. Clone this repository
  3. Run docker-compose up --build in the project root
  4. Navigate to the frontend directory
  5. Run npm install
  6. Run npm start

Usage

  1. Open the app in multiple browser windows
  2. Enter a message and click "Send" in any window
  3. Observe the message appearing in all windows in real-time

Technologies

  • Backend: Node.js, Express, MQTT
  • Frontend: React
  • Infrastructure: Docker, Mosquitto MQTT Broker

License

MIT

About

Proof of concept that a nextjs frontend can effectively communicate with a express server and mqtt broker running in docker.

Topics

Resources

License

Stars

Watchers

Forks