PJS tips
Throughout the PJS tips section, the Profound.js instance runs on a PC and listens on port 8081, so the example URLs are shown in the format http://localhost:8081/xxx. If your Profound.js instance runs on an IBM i system, or on a different port, the URLs will be in the format http://hostName:portNumber/xxx. Please change the URLs to use the correct host and port where needed.
Overview
The PJS tips section collects short, worked examples that answer common “how do I actually do this?” questions about Profound.js. Between them, the tips cover calling and debugging a Profound.js module as a web service, consuming a REST API from a low-code module, exchanging parameters between RPG programs and low-code modules, and calling Profound.js from an IBM i green-screen or Genie session.
Each tip is self-contained, but all of them build in the same workspace. Start with Tip 1: How to create a workspace, which creates the pjstips workspace that every other example on the pages below uses.
Related Pages
- Tip 1: How to create a workspace
- Tip 2: How to quickly call/test/debug a PJS module as a web service
- Tip 3: How to call a low-code module from an RPG program
- Tip 4: How to debug a low-code module by converting to "real" PJS code
- Tip 5: How to set entire body from input parms and get entire response into output parms (in low-code plugin Consume REST Service)
- Tip 6: How to handle variable-size array in body and response (in low-code plugin Consume REST Service)
- Tip 7: How to use commands PJSMYIP and PJSCALL to call a "regular" PJS module on your PC from IBMi system
- Tip 8: How to call an RPG program to return multiple records for a PAPI route