Install and Configure the Oracle Mobile Hub Tooling for Deploying Custom APIs
You can download and configure additional tools to deploy custom APIs in Oracle Mobile Hub.
Install the Node.js Tooling
When you download the SDK from Oracle Technology Network (OTN), you have the
option to download the omce-tools-vXX.X.X
file, which includes a Node.js
script that you can use to deploy your applications to Oracle Mobile Hub
To install the Node.js tooling in your project:
Download a JavaScript Scaffold for a Custom API
After you create your custom API, you can download a scaffold that is based on your API's RAML document, and then use the scaffold as a quick start for implementing your custom API.
The scaffold comes in the form of a Node module, the key components of which are the main JavaScript file that contains stub methods for each endpoint (resource plus HTTP method), and a package.json
file, which serves as the manifest for the module.
To download the scaffold:
- Click
to open the side menu, click Development , and then click APIs.
- Open the API that you want to download.
- In the left navigation area of the API Designer, click Implementations.
- Click JavaScript Scaffold to download the zip file.
- On your system, unzip the downloaded file.
If you later change the API, then you can download a new scaffold based on the updated endpoints. However, any coding that you may have done and uploaded previously won’t be reflected in the new scaffold.
Configure the toolsConfig.json File
After you have downloaded a scaffold file that is based on your API's RAML
document, you can manually configure a JavaScript Notation (JSON) file called
toolsConfig.json
.
Oracle Mobile Hub uses a toolsConfig.json
file that contains the deployment
information for a custom API. A default toolsConfig.json
is
generated when you create a custom API, and you download the scaffold. To configure
the toolsConfig.json
file: