1

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

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

How do I start the board as the usual "atlasboard start" won't work any more as there is no global dependency for this?

Andrew Sumner
  • 793
  • 2
  • 12
  • 29

1 Answers1

4

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:

"dependencies":{
    "atlasboard": "^0.13.0"
},
"scripts":{
    "start":"node start"
}

And this to start.js:

var atlasboard = require('atlasboard');

var port = process.env.VCAP_APP_PORT || 3000

atlasboard({port: port}, function (err) {
  if (err) {
    throw err;
  }
});
Andrew Sumner
  • 793
  • 2
  • 12
  • 29
  • That's correct. Atlasboard 1.0 will include a start.js script so you don't need to workaround this problem anymore. – ivan loire Sep 07 '15 at 09:29