Search Results

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 tested in your development environment.

To push a Node.js app:

  1. Zip up the folder that contains the code; this is the folder which is at the same level as the manifest.json file, so the ZIP archive doesn’t include the manifest file.

    Before zipping up your code, remove the node_modules folder 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 Cloud Integration after your app is pushed, as long as they are defined in the package.json file.

  2. Move your app and the manifest.json file into an empty temporary directory, and then change to that directory.

    For example, given an app and manifest in your home directory:

     mkdir tmp-app
     cd tmp-app
     cp ~/ .
     cp ~/manifest.json .
  3. Log in with the TIBCO Cloud CLI as shown in Logging In With the TIBCO® Cloud - Command Line Interface.

    For example:

     tibcli login 
  4. Push the app using the tibcli app push command.

    For example, given that tibcli is in the path, push the app in the current directory:

     tibcli app push 

    If the push is successful, an app named as the name property in the manifest.json file will be created and started on 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.