Skip to content

Instantly share code, notes, and snippets.

@anantl05
Created September 21, 2019 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anantl05/49b350ff3f5b752ba1063f2da17cc065 to your computer and use it in GitHub Desktop.
Save anantl05/49b350ff3f5b752ba1063f2da17cc065 to your computer and use it in GitHub Desktop.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from "@angular/forms";
import { AppComponent } from './app.component';
import { MqttModule, IMqttServiceOptions } from "ngx-mqtt";
export const MQTT_SERVICE_OPTIONS: IMqttServiceOptions = {
hostname: 'localhost',
port: 9001,
path: '/mqtt'
}
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
MqttModule.forRoot(MQTT_SERVICE_OPTIONS)
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment