In this recipe, we'll combine what you learned with initializers and dependency injection to create a chat room. The chat room will use WebSockets to communicate with the host.
$ ember g service sockjs $ ember g component chat-room $ ember g initializer application $ bower install sockjs --save
These will generate the files needed for the project. The
chat-room component will have all the logic for the chat room that we'll create.
// ember-cli-build.js … app.import('bower_components/sockjs/sockjs.min.js'); …
This will import the library so that we can use the global variable,
sockjs, anywhere in our application.