Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Optional: Cloud9 Development Environment

Chris Beam edited this page Feb 19, 2016 · 13 revisions

Create your account

Setup your workspace

  1. Name and describe your new workspace
  2. Clone HospitalRun (https://github.com/HospitalRun/hospitalrun-frontend.git) from the Clone from Git field
  3. Select Node.js from the Choose a template field to finish setting up your workspace

One of the awesome things about Cloud9 is that many of the dev tools you want are preinstalled, like CouchDB. All you need to do is get Couch running. Run the following commands to get CouchDB setup in Cloud9:

sudo mkdir -p /var/run/couchdb
sudo chown couchdb:couchdb /var/run/couchdb 

Install Packages and Dependencies

From ~/workspace, run the following commands to update and install additional software:

npm install -g npm               #optional
npm cache clean -f               #optional
npm install -g n                 #optional
sudo n stable                    #optional
npm install -g ember-cli@latest
npm install -g bower
npm install
bower install
npm install -g phantomjs-prebuilt

Config CouchDB for HospitalRun testing

Make sure CouchDB is running (see below), then run the following script from ~/workspace: ./script/initcouch.db. When the script terminates, run cp ./server/config-example.js ./server/config.js

Run CouchDB

To run CouchDB, use the following command: sudo su couchdb -c /usr/bin/couchdb. To test if CouchDB is running, run curl http://127.0.0.1:5984.