Deploying Dashboard

Issue #106 resolved
Andrew Sumner created an issue

I'm trying to package and deploy my dashboard via IBM BlueMix.

How do I package atlasboard and include the global dependencies as local?

How do I run the board as the usual "atlasboard start" won't work any more?

Comments (3)

  1. Andrew Sumner reporter

    After packing dependencies as local rather than global discovered that bluemix requires node applications to start on a specific port which is specified in an envrionment variable, my solution was to add this to package.json:

    "scripts":{
        "start":"./start.sh"
    }
    

    And this to start.sh:

    #!/bin/bash
    node node_modules/atlasboard/lib/cli/cli.js start ${VCAP_APP_PORT}
    
  2. Iván Loire

    You can also create a start.js file like this:

    var atlasboard = require('atlasboard');
    atlasboard({port: 3000}, function (err) {
      if (err) {
        throw err;
      }
    });
    

    and then use:

    "scripts":{
        "start":"node start"
    }
    

    in your package.json. (you will also need to add the atlasboard dependency)

    You'll need to just to use process.env to get the port number.

    I will make sure some additional documentation get added to make this clearer

  3. Log in to comment