Ember frontend for HospitalRun
To run the development environment for this frontend you will need to have Git, Node.js, Ember CLI, Bower and CouchDB installed.
To install the frontend please do the following:
- Make sure you have installed Git
- Make sure you have installed Node.js
- Install ember-cli v1.13.13:
npm install -g ember-cli@1.13.13
- Install bower:
npm install -g bower
- Clone this repo with
git clone https://github.com/HospitalRun/hospitalrun-frontend
, go to the cloned folder and:npm install
to install needed node modules.bower install
to install needed bower modules.
- Install ands configure couchdb
- Download and install couchdb from http://couchdb.apache.org/#download
- Create admin user:
- If you have just installed couchdb and have no admin user, please run
initcouch.sh
. A userhradmin
will be created with password:test
. - If you already have a couchdb admin user, please run
initcouch.sh USER PASS
whereUSER
andPASS
are the couchdb admin user credentials.
- Copy the
server/config-example.js
toserver/config.js
.
To start the frontend please do the following:
- Start the server by running
ember serve
in the repo folder. - 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.