Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Mqtt/Mqtt.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class Mqtt {
_createClient () {
if (!this.Config.get('mqtt.aws.endpoint')) {
this.client = mqtt.connect(
`mqtt://${this.Config.get('mqtt.host')}:${this.Config.get('mqtt.port')}`,
`mqtt${this.Config.get('mqtt.ssl') ? 's' : ''}://${this.Config.get('mqtt.host')}:${this.Config.get('mqtt.port')}`,
{
username: this.Config.get('mqtt.username'),
password: this.Config.get('mqtt.password')
Expand Down
10 changes: 10 additions & 0 deletions templates/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ module.exports = {
*/
port: Env.get('MQTT_PORT', 1883),

/*
|--------------------------------------------------------------------------
| Secure Connection
|--------------------------------------------------------------------------
|
| Whether or not to use a secure SSL connection
|
*/
ssl: false,

/*
|--------------------------------------------------------------------------
| Port
Expand Down