Skip to content
Jeffrey E. Shaver II edited this page Feb 4, 2016 · 19 revisions

Setting up Cloud 9

Updating Node/NPM

We should keep our install of nodejs up-to-date. As of this writing, the latest version if v5.5.0.

nvm install v5.5.0
nvm alias default v5.5.0

Install node modules

# From the base directory
npm install
# Change to the examples directory
cd examples
npm install

Install Gulp

npm install -g gulp

Node server changes for Cloud 9

  • In server.js change these lines:
// Change these
app.listen(5000, function () {
  console.log('Listening on port 5000')
})
// To this:
app.listen(process.env.PORT, function () {
  console.log('Listening on port ' + process.env.PORT)
})

Hot Module Reloading and Cloud 9

  • Follow the steps on cloud nine to enable the port 8081
  • Change the gulpfile.js file like this:
// Change the following line
b.plugin(liveReactLoad, {})
// To this
b.plugin(liveReactLoad, {port: 8081, host: 'safe-framework-<username>.c9users.io'})
  • Run gulp watch

Clone this wiki locally