JavaScript Example

Download the JavaScript Application

You can run the JavaScript app directly from the file system. The JavaScript application runs against the preinstalled Demo project.
  1. Download the JavaScript sample app's zip file here.
  2. Unzip it into a folder with no spaces in the path.
    Important! Do not run the files from the zip.
  3. Modify the JavaScript file LogicDemo.js ({froot folder}/WebContent/js}
A JavaScript app is downloaded.

Match your Server Location and Auth Token

Update the Demo project to match your server location and Auth Token. When you create your project (in this example, Demoas shown in "Current project"), API Creator generates a default auth token:
  1. Open the WebContent/js/LogicDemo.js in a text editor.

  2. Update the ec2baseUrl, specifying your account / project.  The following example shows the settings for account valJune18, using the pre-installed demo project (Its urlName is obtained as described here).

  3. Update the currentApiKey:

Run the Application

Run the application directly from the file system.
  1. Double-click WebContent/index.html.
    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, adding Orders, etc. 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 log screen.

ċ
EspressoLogicDemo.png
(188k)
Val Huber,
Feb 16, 2016, 2:30 PM
ċ
LiveAPICeatorLogicDemo.zip
(198k)
Val Huber,
Feb 16, 2016, 2:30 PM
ċ
Logic-Demo-exec.png
(266k)
Val Huber,
Feb 16, 2016, 2:30 PM
ċ
Screen Shot 2015-10-22 at 8.28.21 PM.png
(214k)
Val Huber,
Feb 16, 2016, 2:31 PM
ċ
Screen Shot 2015-11-18 at 4.32.02 PM.png
(223k)
Val Huber,
Feb 16, 2016, 2:30 PM
ċ
Screen Shot 2015-11-19 at 10.41.33 AM.png
(438k)
Val Huber,
Feb 16, 2016, 2:30 PM
ċ
Screen Shot 2015-11-19 at 10.43.52 AM.png
(218k)
Val Huber,
Feb 16, 2016, 2:30 PM
Comments