Ember front end for HospitalRun
To run the app, you will need the following:
- Install ember-cli v1.13.13:
npm install -g ember-cli@1.13.13
- Install bower:
npm install -g bower
- Go to the
frontend
directory, and run the following:npm install
to install needed node modules.bower install
to install needed bower modules.
- Install/configure couchdb
- Download and install couchdb from http://couchdb.apache.org/#download
- Run
initcouch.sh
to setup couchdb with an admin user with the credentialshradmin/test
. * If you have just installed couchdb and have not setup a couchdb admin user, then runinitcouch.sh
. * If you have already created a couchdb admin, then runinitcouch.sh user pass
with the couch admin credentials (where user is the couchdb admin user and pass is the user's password). - Copy the server/config-example.js to server/config.js.
- Start the server so you can view the repo in your browser by running
ember serve
from thefrontend
directory. - Go to http://localhost:4200/ in a browser and login with username
hradmin
and passwordtest
.
Fixtures are PouchDB dumps that are generated with pouchdb-dump-cli.
To create a fixture, run pouchdb-dump http://localhost:5984/main -u hradmin -p test | cat > tests/fixtures/${name_of_fixture}.txt
.
To use a fixture, use loadPouchDump(
${name_of_fixture})` in your acceptance test. For example,
test('visiting /patients', function(assert) {
loadPouchDump('default');
authenticateUser();
visit('/patients');
andThen(function() {
assert.equal(currentURL(), '/patients');
});
});
Contributions are welcome via pull requests and issues. Please see our contributing guide for more details.