# `mix imison.install`
[🔗](https://github.com/elpikel/imison/blob/v0.1.0/lib/mix/tasks/imison.install.ex#L69)

Installs Imison in a Phoenix app: its config, its place in the supervision
tree, the migration that creates its tables and the dashboard route.

## Example

```sh
mix imison.install
mix ecto.migrate
```

`mix igniter.install imison` adds the dependency and runs this task in one step.

## Changes

  * `config/config.exs`: `repo`, `pubsub` (the endpoint's `pubsub_server`)
    and, when the app has a `Mailer` module, `mailer`
  * `config/runtime.exs`: the production login, from the `IMISON_USER` and
    `IMISON_PASSWORD` environment variables
  * `config/dev.exs`: the login `admin` with a password generated at install time
  * `config/test.exs`: `enabled: false` and a test login
  * the application's children: `{Imison, Application.fetch_env!(:my_app, Imison)}`
    after the repo and the PubSub
  * a migration `add_imison` calling `Imison.Migration`
  * the router: `import Imison.Web.Router` and `imison_dashboard "/errors"`
    in a scope piped through `:browser`
  * `.formatter.exs`: `:imison` in `import_deps`

A change that is already there is skipped, so running the task again changes nothing.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
