Visual Builder is not just a development platform it is also the hosting platform for the apps you developed. The VB server provides various capabilities delivered as an Oracle managed cloud service – removing the need to worry about the server maintanance and availability from your team. The VB Server includes a built in database and middle-tier that allow you to host business objects, their business logic, their data, and the REST APIs they expose. Another service provided by the VB server is a REST access proxy that can be used to manage credentials passing and CORS access to external REST endpoints. The last part of functionality provided by the VB Server is integration with the Oracle Identity Cloud Service (IDCS) to manage authentication and authorization using users and groups defined in IDCS.
All that being said, in some cases we ran into customers who are only looking to leverage VB for the simplicty of developing an Oracle JET based web user interface, and they are looking to run that interface on other servers without using (or paying) for the VB server. You can achieve this, if your app doesn't rely on the above mentioned server functionality.
It is quite simple to take your app and run it outside of VB server, especially with the new packaging and optimization build step provided by Visual Builder Studio.
Preparing The App
First we need to make sure that the app doesn't rely on the key server functionality:
To remove dependency on IDCS mark your app as "allow anonymous access" under the web app's setting->security tab.
Next make sure that REST services that you are calling from your VB app don't require the VB Proxy. Set the connection type to be "Dynamic The Service Supports CORS". You also need to set the proper authentication type setting for your server. See the table in the VIsual Builder documentation chapter about "Appropriate Connection Type to Handle CORS REST Services" for detailed explaination of the combinations that won't need to use the VB REST Proxy.
Update 2024 – with the switch to backends as a requirement for REST services, there is an additional change required – see information in the second part of this blog about deploying VB apps for free.
At this stage your applicaiton should be ready for deployment – which we'll do using Visual Builder Studio.
Packaging and Deploying
In Visual Builder Studio you can use the default package job that is created when you create a new workspace or you can create a new one. In both cases you'll configure the job to:
1. Map to your Git repostiory that contains the application's code
2. Add a build step that uses the package step from the Visual Application set of options to package and optimize your app
3. Add an after-build step to archive the zip file created
Run the build job and in the artifacts section you'll find the zip file with your application optimized for deployment (default name is built-assets.zip).
Take this zip file and extract it, locate the webApps directory and copy it or the directory with the specifc web app into the web server that will host your application.
You should be able to now invoke the index.html page.
Demo
Here is a quick video showing the above steps and how to take a simple Visual Builder app and deploy it on Tomcat server for example.
