The client app contains the p-code files, the application executable file, resource files, OCX files, and other external files.
Most of these files are the same as in PowerBuilder traditional client/server applications, except for the p-code files. Every object or definition file in the PBLs is compiled into its individual corresponding p-code file instead of monolithic PBD file. Each version of p-code file has a unique identifier so that when a user runs the installable cloud app the p-code files can be incrementally downloaded and updated.
If you have created multiple deployment versions for the application, then you will have multiple sub-folders for versions, such as 1.01, 1.02, 1.03 etc. With the various versioning options, you can easily control the upgrade of an installable cloud app.
The index.html file in the client app is the default entry of the installable cloud app.
To run the installable cloud app, the URL should point to this file: http://IPAddress/AppName/index.html or http://IPAddress/AppName. AppName is the App Name setting configured in IDE and used as the folder name hosting the client app, for example, "salesdemo_cloud".
The application URL can be automatically formulated if you have correctly specified the site URL in the project painter; so after you build & deploy the project to the local Kestrel or IIS, you can directly Run Project from the PowerBuilder IDE.
Each client app contains a configuration file called apprun.json.
This file configures where to download the launcher and the runtime and which PowerServer Web APIs to access. You can directly specify the relevant URLs in this file.
{ "deployment_urls": { "launcher": "CloudAppPublisher/CloudAppInstall 25.0", "runtime": "CloudAppPublisher/runtime/25.1.0.2670", "web_api": "http://localhost:5099" } }
-
The launcher URL and the runtime URL can be relative URLs (without the site/domain name) or complete URLs (including the site/domain name).
Use relative URLs when the app (and apprun.json), launcher, and runtime are under the same site (as shown in the figure below).
"launcher": "CloudAppPublisher/CloudAppInstall 25.0", "runtime": "CloudAppPublisher/runtime/25.1.0.2670",
Or, use complete URLs no matter the app (and apprun.json), launcher, and runtime are under the same site or not.
"launcher": "http://[ip]:[port]/CloudAppPublisher/CloudAppInstall 25.0", "runtime": "http://[ip]:[port]/CloudAppPublisher/runtime/25.1.0.2670",
-
The Web API URL must always be a complete URL (it cannot be a relative URL even if the app (and apprun.json) and Web APIs are under the same site).
Most of the time, it will be the site URL, for example, when you publish the Web APIs to the web root.
"web_api": "http://172.16.100.2:82"
When the site URL is accessed, the web.config file located in the web root will be read and the Web API application (ServerAPIs.exe) specified in this file will be launched.
It can also be the site URL + sub-folder name (the sub-folder must be converted to an IIS sub-app first).
For example, in the following figure, you can convert the "googlecharts_cloud_API" folder to an application in IIS, and then include the folder name "googlecharts_cloud_API" in the Web API URL:
"web_api": "http://172.16.100.2:83/googlecharts_cloud_API/"
When the site URL + sub-folder name is accessed, the web.config file located in the sub app will be read and the Web API application (ServerAPIs.exe) specified in that web.config will be launched.
Note
If you have not converted the sub-folder to a sub-app, you can specify the site URL as the Web API URL, and configure the site web.config file to start the Web API application (ServerAPIs.exe) in the sub-folder.
If you want to run more than one Web APIs under the same site at the same time, you must convert them to sub-apps, and then configure the web.config file under each sub-app.