JavaScript Sample Application

JavaScript Sample Application
The JavaScript sample application runs against the Demo database. You can run it directly from the file system.
For more information about the the Demo database, see Business Logic API Project Sample.
In this article:
Download the JavaScript Application
  1. Download the JavaScript sample application's  file. 
  2. Unzip it into a folder that does not include spaces in the path.
    Do not run the files from the zip.
  3. Modify the 
    {root folder}/WebContent/LogicDemo.js
     JavaScript file.
The JavaScript application is downloaded.
Match your Server Location and Authentication Token
Update the 
 API sample to match your server location and authentication token. When you create your API (in this example, 
), API Creator generates a default authentication token.
The following image shows the 
 key in the 
 API sample:
  CA Technologies  
Follow these steps:
  1. Open the 
     file in a text editor.
  2. Update the 
    , specifying your account/project. The following example shows the settings for account 
     using the pre-installed demo project (Its 
     is obtained.)
    For more information about the 
    , see The API Project URL.
  3. Update the 
    . The following image shows the contents of the 
    CA Technologies  
  4. Save your changes.
The server location and authentication token are matched.
Run the Application
Run the application directly from the file system. Double-click 
. The application runs in your browser.
The following image illustrates how the app should look:
Explore the various use cases, such as changing line items and adding orders. Changes are immediate; you do not have to save. Changes are detailed as transaction logs in the Logic Execution Plan pane. The same log displays in your log screen.
For more information about logs and the log screen, including how to debug applications, see View Logging Information.