Version 22




    With the Fall 2014 Jive Cloud release (version 8c4), you can now have Jive host your app's static assets. This is a valuable solution when you want to create an app for your community that wouldn't otherwise need a middleware service. You no longer need to prop up a server just to host static app assets. You can create a Jive-hosted app manually, or by using the Jive Node SDK.


    Creating a Jive-hosted App Manually


    In order to have Jive host your app's assets, you simply need to bundle the app assets in a public folder within your add-on package.


    Let's review what a typical add-on package looks like when self-hosting an app:


    An add-on containing a Jive-hosted app simply contains an additional public folder with the static assets (including the app.xml file):


    You also must modify the "url" property for the app within the definition.json file so that it specifies the local Jive-hosted app.xml rather than a file hosted on your service.


        "integrationUser": {
            "systemAdmin": false
        "osapps": [
                "name": "Simple App Skeleton",
                "id": "5def25e4-444f-51f4-97cf-abb281219898",
                "appPath": "5def25e4444f51f497cfabb281219898",
                "url": "/public/apps/simpleapp/app.xml"


    That's all you need to do in order to have Jive host your app assets.


    Creating a Jive-hosted App with the Jive Node SDK


    You can easily create a Jive-hosted app using the Jive Node SDK. After installing the Jive Node SDK, follow these instructions:

    1. Create an app using the Jive Node SDK.
      jive-sdk create app
    2. Perform any desired customizations to this app. For a tutorial on creating an app, refer to Getting Started > Creating an App with the Jive Node SDK. Any assets you want Jive to host that are unique to this app should be located in the app's public folder (e.g. /apps/myapp/public). Any assets you want Jive to host that should be accessible to all apps within this add-on should be located in the add-on's public folder (e.g. /public).
      This is the way the Jive Node SDK automatically sets up the project, so you should not need to create these public folders. What is new, however, is that when accessing the global assets (assets accessible to all apps within this add-on), you must use the following keyword: __public__. For example:
      <script type="text/javascript" src="/__public__/javascripts/my_brilliant_script.js"></script>
      This syntax will automatically resolve to the global public folder both when testing locally and when installed into your Jive community.
    3. (Optional) Test the app. You can test the app locally by starting a node server as you would for a self-hosted app.
      node app.js
    4. Build the add-on package. In order to build a Jive-hosted app, use the following new syntax:
      jive-sdk build add-on --apphosting="jive"
      This should create an add-on package with the proper app assets for Jive to host.
    5. Upload the package. You can now follow the deployment instructions without the need to start a Node service at all: Getting Started > Deploying a Jive Node SDK Project as an Add-On. Be sure not to follow the optional step to start the Node service since it isn't necessary.

    That's it! You've now deployed an app with Jive-hosted assets.