-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Optional: Cloud9 Development Environment
Make your free account with Cloud9 here. I found the easiest way to make a new account is to use the GitHub Account Creation tool found at the top of the page.
- Name and describe your new workspace
- Fork HospitalRun to your own repository in GitHub or elsewhere
- Clone HospitalRun from your own repository using the Clone from Git field
- 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
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
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
. Use the sudo command every time you launch CouchDB, or the Ember app will fail to load.
Make sure CouchDB is running (see below), then run the following script from ~/workspace
: ./script/initcouch.sh
. When the script terminates, run cp ./server/config-example.js ./server/config.js
The easiest way to start the Ember app is to run npm start
from the root of your workspace. If this fails to work, check the error log that prints out. ember s
(or ember serve
) is another way to start the HospitalRun localhost server.
Each time you work on this project, you're probably going to want to update your fork from HospitalRun's master. To do this, you need to set up HospitalRun as the upstream repository to your personal origin repo. Use this guide from GitHub for help on using forks correctly.
For your dependencies to work properly, they will need to be updated every time the package information is changed. To update them, run npm install
and bower install
from the root of your workspace.