Skip to content

Commit 06c3ed2

Browse files
authored
Merge pull request #3 from behind-design/master
Fixed some typos on the README
2 parents b0a2054 + cfe84ff commit 06c3ed2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ npm install aws-mqtt-client --save
1111

1212
## Basic usage
1313

14-
1. Create an IAM role and asign predefined `AWSIoTDataAccess` policy. (It is better to use [AWS Cognito](https://aws.amazon.com/cognito/) to provide temprerary credentiels for the front-end application, you can also customize policy to allow access only to user specific topics)
14+
1. Create an IAM role and asign predefined `AWSIoTDataAccess` policy. (It is better to use [AWS Cognito](https://aws.amazon.com/cognito/) to provide temporary credentials for the front-end application, you can also customize policy to allow access only to user specific topics).
1515
2. Run AWS CLI command `aws iot describe-endpoint` to get IoT endpoint url.
16-
3. Create `mqttClient` with AWS credentials
16+
3. Create `mqttClient` with AWS credentials.
1717
````js
1818
const mqttClient = new AWSMqtt({
1919
accessKeyId: AWS_ACCESS_KEY,
@@ -23,7 +23,7 @@ const mqttClient = new AWSMqtt({
2323
region: 'us-east-1'
2424
});
2525
````
26-
4. Connect and recieve messages from your topic
26+
4. Connect and receive messages from your topic.
2727
````js
2828
mqttClient.on('connect', () => {
2929
mqttClient.subscribe('test-topic');
@@ -33,13 +33,12 @@ mqttClient.on('message', (topic, message) => {
3333
console.log(message.toString());
3434
});
3535
````
36-
5. Publish a message
36+
5. Publish a message.
3737
````js
3838
mqttClient.publish(MQTT_TOPIC, message);
3939
````
4040

4141
### Complete [MQTT.js API](https://github.com/mqttjs/MQTT.js#api)
4242

4343
## Credits
44-
Based on [Serverless JS-Webapp Pub/Sub with AWS IoT](http://stesie.github.io/2016/04/aws-iot-pubsub) article by [Stefan Siegl](https://github.com/stesie)
45-
This library is a wrapper around [MQTT.js](https://github.com/mqttjs/MQTT.js) npm package.
44+
Based on [Serverless JS-Webapp Pub/Sub with AWS IoT](http://stesie.github.io/2016/04/aws-iot-pubsub) article by [Stefan Siegl](https://github.com/stesie). This library is a wrapper around [MQTT.js](https://github.com/mqttjs/MQTT.js) npm package.

0 commit comments

Comments
 (0)