Skip to content

tetherto/svc-facs-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

svc-facs-mqtt

This facility implements a promise based mqtt client and a simple mqtt broker.

Config

This uses config file and it can only have one param port which can be used to configure the port of the aedes broker. When initializing the facility, you can pass _hasConf: false in opts to disable the config file.

API

fac.getClient

Initiates a mqtt client instance for specific server.

Params:

  • opts.url<string> - MQTT broker url
  • opts.libOpts<object> - options for the underlying mqttjs library

Result:

  • MQTTClient

Example:

const mqtt = fac.getClient({
  url: 'mqtt://127.0.0.1:7070'
})

fac.startServer

Starts a mqtt broker powered by aedes. The broker will be started on the port specified in config file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •