npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hospitalkiller

v0.9.14

Published

Ember front end for HospitalRun

Downloads

6

Readme

HospitalRun frontend

Ember frontend for HospitalRun

Build Status

To run the development environment for this frontend you will need to have Git, Node.js, Ember CLI, Bower and CouchDB installed.

Contributing

Contributions are welcome via pull requests and issues. Please see our contributing guide for more details, including a link to join our project Slack.

Install

To install the frontend please do the following:

  1. Make sure you have installed Git
  2. Make sure you have installed Node.js. Versions after 0.10.0 should work, but please note if you encounter errors using 5.x it may be necessary to upgrade your npm version. Versions after 3.5.x should work:
    1. npm install -g npm
  3. Install ember-cli latest: npm install -g ember-cli@latest. Depending on your npm permissions you might need root access to install ember-cli.
  4. Install bower: npm install -g bower
  5. Clone this repo with git clone https://github.com/HospitalRun/hospitalrun-frontend, go to the cloned folder and run script/bootstrap. (Note: Depending on your npm permissions you might need root access to install PhantomJS2; also, Windows users must run with Cygwin.
  6. Install and configure CouchDB
    1. Download and install CouchDB from http://couchdb.apache.org/#download
    2. Create admin user:
      1. If you have just installed CouchDB and have no admin user, please run ./script/initcouch.sh in the folder you cloned the HospitalRun repo. A user hradmin will be created with password: test.
      2. If you already have a CouchDB admin user, please run ./script/initcouch.sh USER PASS in the folder you cloned the HospitalRun repo. USER and PASS are the CouchDB admin user credentials.
  7. Copy the server/config-example.js to server/config.js in the folder you cloned the HospitalRun repo. If you already had a CouchDB admin user that you passed into the couch script (./script/initcouch.sh USER PASS), then you will need to modify the couchAdminUser and couchAdminPassword values in server/config.js to reflect those credentials.

Experimental

Make

If you are willing to try using make, ensure you have installed git, node and couchdb (steps 1, 2 and 7 above), you may skip the rest. This requires couchdb in the path to work correctly.

  • Run make serve, it will start couchdb, install npm dependencies and start the server.
  • Run make all to run all tests and build the app.
  • Look into Makefile to figure other targets available.

Cloud 9 Development Environment

Documented in the project wiki

Nitrous Quickstart

Create a free development environment for this HospitalRun project in the cloud on Nitrous.io by clicking the button below.

In the IDE, start HospitalRun via Run > Start HospitalRun and access your site via Preview > 4200.

Start

To start the frontend please do the following:

  • Start the server by running npm start in the repo folder.
  • Go to http://localhost:4200/ in a browser and login with username hradmin and password test.

Troubleshooting your local environment

Always make sure to git pull and get the latest from master.

The app will usually tell you when something needs to happen (i.e. if you try to npm start and npm is out of date, it will tell you to run npm update. But If you run into problems you can't resolve, feel free to open an issue, or ask for help in the HospitalRun Slack channel (you can request an invite here).

Otherwise, here are some tips for common issues:

The browser shows only a loading dialog

Is your server (still) running? Is Couch running? If not, that's probably the issue.

My changes aren't showing up in the browser

Try a browser refresh cmd + r.

Loading sample data

If you would like to load sample data, you can do so by navigating to Load DB under the Administration menu. You should see the following screen: Load DB screenshot

Click on Choose File and select the file sample-data.txt which is included in root directory of the repo at sample-data.txt. Next, click on Load File. When the database load is complete a message will appear indicating if the load was successful.

Testing

Fixtures for Acceptance Tests

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 runWithPouchDump(${name_of_fixture}, function(){..}); in your acceptance test. For example,

test('visiting /patients', function(assert) {
  runWithPouchDump('default', function() {
    //Actual test code here
    authenticateUser();
    visit('/patients');
    andThen(function() {
      assert.equal(currentURL(), '/patients');
    });
  });
});

The SCSS linter

To keep our styling scalable and consistent, we are using an scss linter that will throw an error in the build if you do not conform to it's syntax rules. The syntax rules are defined in the .scss-lint.yml file, and documentation for each linter is available here.

The easiest way to work with styles in the project and abide by our linting rules is to install the linter-scss-lint package for Atom. The package will then show you in real time where your styles are breaking the linter and how to correct them.

Contributing

Again, contributions are welcome via pull requests and issues. Please see our contributing guide for more details.

Seriously, please read the Contribution Guide.

Further Reading / Useful Links