Pushing and Deploying Node.js Apps
After adding your own code to the generated code stubs, you can push the code to TIBCO® Cloud Integration and run your app. Before pushing your app to TIBCO Cloud Integration, it’s highly recommended that your app is running and tested in your development environment.
To push a Node.js app:
Zip up the folder that contains the code; this is the folder which is at the same level as the
manifest.jsonfile, so the ZIP archive doesn’t include the manifest file.
Before zipping up your code, remove the
node_modulesfolder under the code’s root directory, so the ZIP archive will not contain the Node.js modules downloaded during development. The Node.js modules required by your code will be installed by TIBCO Cloud Integration after your app is pushed, as long as they are defined will in the package.json file.
Move your app and the
manifest.jsonfile into an empty temporary directory, and then change to that directory.
For example, given an application
myApp.zipand manifest in your home directory:
mkdir tmp-app cd tmp-app cp ~/myApp.zip . cp ~/manifest.json .
Log in with the TIBCO Cloud CLI as shown in Logging In With the TIBCO® Cloud - Command Line Interface.
Push the app using the
tibcli app pushcommand.
For example, given that
tibcliis in the path, push the app in the current directory:
tibcli app push
If the push is successful, an app named as the
nameproperty in the
manifest.jsonfile will be created and started on TIBCO Cloud Integration.
Note: If there is an existing app with an identical name as the app that you are trying to push to the cloud, the existing app will be overwritten with the newly pushed app. You will not see a warning about it.
You can also use all the
tibcli command-line parameters to specify the app name, the desired instance count, the sandbox, and so on.