Host an Application on a Content Delivery Network (CDN)

You can host an application on a CDN to improve response times for clients that connect to your visual application.

Before you can publish your app, you need to stage it and export it your local machine. Once you have exported it to your local machine, build it using the following command from the root directory where you extracted the exported application:

./node_modules/.bin/grunt vb-build \
    --url=<url of visual app instance> \
    --username=<username> \
    --password=<password> \
    --id=<your visual app ID> \
    --ver=<your visual app version> \
    --cdnURL=<url of the deployed application's assets> \
    --insertBaseUrl

Note:

The URL for the cdnURL option must end with /. For example, https://hostname:port/CDN/webApp/CDNLocation/. If you omit the final /, the resources will be resolved against the parent segment of the URL.

The insertBaseURL task option inserts a BASE_URL token into index.html's vbInitConfig section.

Copy build/optimized.zip that the grunt vb-build task generates to the CDN host and extract it to the directory location where the CDN will host it.

For information about using the grunt vb-build task, see Build Your Application Locally.