File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 11var cb = new ClearBlade ( ) ;
22var 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
1212var part1Event = function ( ) {
Original file line number Diff line number Diff line change 1+
12var 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
2224var part3bEvent = function ( ) {
23- showView ( "part4" ) ;
24-
25- } ;
25+ document . getElementById ( "weatherList" ) . innerHTML = "" ;
26+ showView ( "part4" ) ;
27+ } ;
You can’t perform that action at this time.
0 commit comments