Skip to content

Instantly share code, notes, and snippets.

@kenmazaika
Last active May 13, 2017 02:44
Show Gist options
  • Save kenmazaika/c0d40f4f00aa829f31f5539d915f36d4 to your computer and use it in GitHub Desktop.
Save kenmazaika/c0d40f4f00aa829f31f5539d915f36d4 to your computer and use it in GitHub Desktop.

Cloud9 / React Environment Setup

The Node type of a work space contains a very out of date version of node, so you'd need to update it anyway. Because of this, I suggest creating a new Blank workspace.

In the instance update node:

nvm install 7.9.0

Update NPM:

npm install -g npm@latest

Then install the react client.

npm install -g create-react-app

Then create a new project:

create-react-app myapp

Move to the application folder:

cd myapp

Then edit the file package.json to launch the server on port 8080, since that's a special port in Cloud9.

"start": "PORT=8080 react-scripts start",

Then run npm start, hit the Preview button and the app should be displayed.

react

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment