Skip to content

Instantly share code, notes, and snippets.

@doomspork
Created October 15, 2015 21:17
Show Gist options
  • Save doomspork/f3f64eceab9c1ec82a14 to your computer and use it in GitHub Desktop.
Save doomspork/f3f64eceab9c1ec82a14 to your computer and use it in GitHub Desktop.
Running Hospital + Medic

Running Hospital

  1. Enter the project directory:

    $ cd hospital
  2. Create and migrate the database:

    $ mix ecto.create && mix ecto.migrate
  3. Run the seed file:

    $ mix run priv/repo/seeds.exs

    Note: The username/password and medic auth-token will be displayed at the end, they are necessary later.

  4. Run application:

    $ mix phoenix.server
  5. View the application at localhost:4000

Running Medic

  1. Enter the project directory:

    $ cd medic
  2. Build the executable:

    $ mix escript.build
  3. Run the executable with the auth-token from earlier and development endpoints:

    $ ./medic --auth-token="medic-auth-token" \
    	--update-url="http://localhost:4000/api/health_checks" \ 
    	--report-url="http://localhost:4000/api/reports"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment