Reference these
I was working thorugh mission 2. I am using javascript. I was required to download 2 different directories.
In the first file “CodelessShoppingCartService” there was an index of a similar name.
in the second file “invoke-api-service-with-generated-sdk” there was a file named index.
Here is the original code for index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Backendless Project Template</title>
</head>
<body>
<a href="javascript:getInstructions()">Get Instructions</a>
<a href="javascript:addItem()">Add Item</a>
<a href="javascript:getItems()">Get Items</a>
<a href="javascript:purchase()">Purchase</a>
<div id="output">
</div>
<script src="http://api.backendless.com/sdk/js/latest/backendless.min.js"></script>
<script src="js/services/CodelessShoppingCartService.js"></script>
<script src="js/controller.js"></script>
</body>
</html>
i modified it to include code from the first file
const appId = '34292C6A-B3A7-83DD-FF79-EF9E6913F900';
const apiKey = '<API KEY HERE>';
const serverURL = 'https://api.backendless.com';
Backendless.serverURL = serverURL;
Backendless.initApp(appId, apiKey);
</script>
for a final product of
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Backendless Project Template</title>
</head>
<body>
<a href="javascript:getInstructions()">Get Instructions</a>
<a href="javascript:addItem()">Add Item</a>
<a href="javascript:getItems()">Get Items</a>
<a href="javascript:purchase()">Purchase</a>
<div id="output">
</div>
<script type="text/javascript"src="http://api.backendless.com/sdk/js/latest/backendless.min.js"></script>
<script type="text/javascript">
const appId = '34292C6A-B3A7-83DD-FF79-EF9E6913F900';
const apiKey = '<API KEY HERE>';
const serverURL = 'https://api.backendless.com';
Backendless.serverURL = serverURL;
Backendless.initApp(appId, apiKey);
</script>
<script src="js/services/CodelessShoppingCartService.js"></script>
<script src="js/controller.js"></script>
</body>
</html>
I got it working!!!