Optimize Your Application for Deployment

It's strongly recommended that you optimize your Digital Customer Service application for Production deployment.

You can optimize the performance of your published Digital Customer Service application by using node and Grunt to build them locally or to set up build jobs on Oracle Developer Cloud Service. For more information about optimizing your application, refer to the Optimize Your Builds topic in the Developing Applications with Oracle Visual Builder guide.

For more information on :ce values, refer to the Manage Your Component Exchange link in Related Topics.

The instructions listed here reflect a Windows deployment. If you are using Unix, change the path appropriately. For example: ./node_modules/.bin/grunt.
  1. You must first install the Node.js. (npm is included in the Node.js installation).

    To download the appropriate installation package for your operating system, and for more information on the installation and configuration of it, refer to: https://nodejs.org .

  2. Run the following one-time command from a Command Prompt in Windows or Shell window in Unix to install grunt CLI globally:

    npm install -g grunt

  3. Create your Digital Customer Service application in the Visual Builder Designer.
  4. Each time you want to optimize the VB app you've created, run the following:
    1. Export the VB app from VB Designer to the local machine.
    2. Unzip VB app to your local directory.
    3. From the Command Prompt, change the directory to the top level where the application is expanded and the Gruntfile.js file located.
    4. Install a local copy of grunt by running the following command: npm install
    5. Run the following processes using these examples:
      • .\node_modules\.bin\grunt vb-clean

      • .\node_modules\.bin\grunt vb-process-local vb-package --url:ce=<component exchange URL> --username:ce=<component exchange username> --password:ce=<component exchange password>

      • .\node_modules\.bin\grunt vb-deploy --url=<https:<VBCS host>/ic/builder> --username=<VBCS username> -- password=<VBCS password> --id=<VBCS application ID> --ver=<VBCS app version> --profileId=user_proxy_prod --publish
        Note: To obtain the VBCS application ID open the app in the VBCS designer and see it in the address bar. For example, for the application My App 1, typically the following address is shown: https://<host>:<port>/ic/builder/?root=application&application=My_App_1-1.0&artifact=Welcome where My_App_1 is the application ID, and 1.0 is the application version. Visual Builder design time replaces certain special characters in the application name such as space and hyphen with underscores to generate the application ID, so they are not always the same. Another way to get the application ID is from the published (live) application’s URL. In our example, when the application is published, its URL would be: https://<host>:<port>/ic/builder/rt/My_App_1/live/webApps/dcs/, where My_App_1 section of the URL is the application ID.

If your VB App is in Source Control in VB Studio, you can use the pipelines to automate the optimization tasks and reference.