Webstorm issues

Mission: SERVERLESS 101
Task: Invoke the API Service using generated client SDK

I’ve tried several times using Webstorm to invoke the API service correctly without success. I may not be loading the files into Webstorm correctly. Need help.

Attached a screenshot from Webstorm.

Here the error I am receiving from the Chrome Developr Tool:

Access to XMLHttpRequest at ‘https://api.backendless.com///services/CodelessShoppingCartService/getInstructions’ from origin ‘http://localhost:63342’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Hi, @Ron_Mansolo

You need to add to the index.html file this code:

<script>
  const appId = 'YOUR APP ID';
  const apiKey = 'YOUR API KEY';

  Backendless.initApp(appId, apiKey);
</script>

By the way, you may find it in CodelessShoppingCartService.html file.

Regards,
Marina

Thank you. That worked.