Closed dhenningsver closed 6 months ago
The setup is pretty much the same for on-prem and cloud:
devConfiguration
is included in index.html, like so: <lm-app devWidget="some.widget" devConfiguration="configuration.json"></lm-app>
.configuration.json
, set the intended tenant: "ionApiUrl": "http://localhost:8083/<TENANT_GOES_HERE>"
.configuration.json
, set the ION API token: "ionApiToken": "<TOKEN_GOES_HERE>"
.package.json
, enter values in the "config"
property, e.g:"config": {
"server_port": "8080", // Leave as-is
"server_path": "./Widgets", // Leave as-is
"proxy_local_port": "8083", // Leave as-is, must match the port used in configuration.json ionApiUrl
"proxy_remote_host": "domain.server.com", // Example: "mingle-ionapi.inforcloudsuite.com"
"proxy_remote_port": "443" // Leave as-is
}
You can get the ION API token and hostname either by inspecting requests made in a "real" environment, or copy them from the UI in the API Gateway.
Finally, start the proxy with the "Start Proxy" vscode build task (Ctrl+Shift+B), or run the script in a terminal node path/to/proxy.js
Thanks, your instruction worked like a charm. I missed the config part in the package.json.
Nice! Glad it worked out. You can also provide the same config as arguments to the proxy script, like:
node ../proxy.js 8083 the-ionapi-hostname 443
....but I personally prefer the package.json conf.
Hi, How do you proxy the ION API calls in a cloud environment. The documentation regarding the ION API seems to be related to on premise? I don't get it to work in cloud. I have tried to set the cloud url directly in the configuration.json but then I get CORS issues instead.