2. Deploy the sample application to Bluemix

  1. Download the code (mqlight-fishalive-node.zip) from the following GitHub project: https://github.com/ibmecod/mqlight-fishalive-node
    Click Clone or download and select Download ZIP

  2. Extract the files from the zip file to an empty directory and navigate to this directory. Edit the manifest.yml file and update the services: entry for both applications to match the application name that you set in Step 1.
    Save the updated file.

  3. From the same directory, use the Cloud Foundry cf login command to log into Bluemix and select the organization and space with your Message Hub service. Push the backend and front-end apps by running the cf push
    During this deployment, the backend application is pushed to Bluemix and started first.

    Note the use of the no-route: true option for this application in the manifest file. This prevents Bluemix from creating an external route for this worker application.

    Also, notice that two instances of the worker will be started.

  4. When the deployment finishes, run the cf apps command or use the Bluemix dashboard to see that the applications are running.
      • Use the cf apps to see the status of applications.

        • Use the Bluemix Cloud Foundry Apps dashboard to check the status of the applications.

    • Enter the URL shown in a browser or click the link from the dashboard to load the front-end application. Click Submit Work to send messages for processing by the back end.
      The backend converts words to uppercase and they are retrieved for display in the browser in the order received. Note that words might appear out of order from the original submission because the workers are asyncronous.
    • Run this command: cf logs mql.fishalive.node.backend. Then, observe the output when you click Submit WorkObserve how the log shows both application instances for the worker receiving data from the front end.