1 Star 0 Fork 1

谷动谷力/MQTT-Client-Examples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

mqtt-client-JavaScript

This repository contains examples of using the MQTT.js library to create MQTT clients in various JavaScript environments. The examples demonstrate how to connect, subscribe, publish, and receive messages using MQTT.js in the following environments:

All of these examples share similarities in their implementation. You can refer to this tutorial for a comprehensive guide on using MQTT.js: MQTT.js Tutorial.

Prerequisites

Before you start, make sure you have the following installed on your machine:

  • Node.js (for Node.js examples)
  • A modern web browser (for browser-based examples)

Repository Structure

This repository contains the following JavaScript files that demonstrate how to use MQTT.js in different environments and configurations:

  • mqtt-client.js: A basic MQTT client example using MQTT.js in Node.js
  • mqtt-client-tls.js: An MQTT client using TLS/SSL encryption for a secure connection
  • mqtt-client-tls-two-way.js: An MQTT client using two-way TLS/SSL encryption for secure communication with certificate authentication

Usage

This repository serves as a collection of code examples for using MQTT.js in various JavaScript environments. It is not intended to be run as a standalone project. Instead, you should integrate the provided examples into your own projects based on your specific use case.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lojam/MQTT-Client-Examples.git
git@gitee.com:lojam/MQTT-Client-Examples.git
lojam
MQTT-Client-Examples
MQTT-Client-Examples
master

搜索帮助