Skip to content

Commit d66347a

Browse files
committed
2 parents e8c9ea3 + 5e2eeec commit d66347a

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var initOptions = {
2424
```
2525
- Save the file
2626

27-
If your using a local instance try platform_url = "http://localhost:8080"; messaging_url = localhost;
27+
If you are using a local instance try platform_url = "http://localhost:8080"; messaging_url = localhost;
2828

2929

3030

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126

127127
<div id="part4" class="hiddenView">
128128
<div class="label">Part 4 - Create a service</div>
129-
<div>Implement your Web API by creating a new service that </div>
129+
<div>Implement your Web API by creating a new service that is secure and runs your business logic</div>
130130
<ul>
131131
<li>Are written in standard Javascript</li>
132132
<li>Take custom parameters and respond with standard JSON objects</li>

js/part1.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
var cb = new ClearBlade();
22
var initOptions = {
3-
URI : "YOUR_PLATFORMURL",
4-
messagingURI : "YOUR_MESSAGINGURL",
3+
URI : "PLATFORM_URL",
4+
messagingURI : "MESSAGING_URL",
55
messagingPort: 8904,
66
useMQTT: true,
77
cleanSession: true,
8-
systemKey: "YOUR_SYSTEMKEY",
9-
systemSecret: "YOUR_SYSTEMSECRET"
8+
systemKey: "SYSTEMKEY",
9+
systemSecret: "SYSTEMSECRET"
1010
}
1111

1212
var part1Event = function() {

js/part3.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
12
var part3Event = function() {
23
var query = cb.Query({collectionName: "Weather"});
34
query.setPage(0,0);
45
query.fetch(function(err, data){
56
if (err){
6-
showError("part3", data)
7+
showError("part3", "Either collection does not exist or it doesn't have the right permissions")
78
}else{
9+
document.getElementById("weatherList").innerHTML = "";
810
var listElement = document.getElementById("weatherList");
911
listElement.innerHTML="";
1012
for (var i =0 ; i < data.length; i++) {
11-
var node = document.createElement("li");
13+
node = document.createElement("li");
1214
var textNode = document.createTextNode(JSON.stringify(data[i].data));
1315
node.appendChild(textNode);
1416
listElement.appendChild(node);
@@ -20,6 +22,6 @@ var part3Event = function() {
2022
};
2123

2224
var part3bEvent = function() {
23-
showView("part4");
24-
25-
};
25+
document.getElementById("weatherList").innerHTML = "";
26+
showView("part4");
27+
};

0 commit comments

Comments
 (0)