Skip to content

Commit 6cbaa85

Browse files
committed
Update Getting Started guide
1 parent 046f288 commit 6cbaa85

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

guides/Getting Started.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,35 @@ In this guide we will learn how to install ErrorTracker in an Elixir project so
66

77
**This guide requires you to have set up Ecto with PostgreSQL, MySQL/MariaDB or SQLite3 beforehand.**
88

9-
## Installing ErrorTracker as a dependency
9+
## Automatic installation using Igniter
10+
11+
The ErrorTracker includes an [igniter](https://hex.pm/packages/igniter) installer that will add the latest version of ErrorTracker to your dependencies before running the installer. Installation will use the application's default Ecto repo and Phoenix router, configure ErrorTracker and create the necessary database migrations. It will basically automate all the installation steps listed in the [manual installation](#manual-installation) section.
12+
13+
### If Igniter is already available
14+
15+
ErrorTracker may be installed and configured with a single command:
16+
17+
```bash
18+
mix igniter.install error_tracker
19+
```
20+
21+
### If Igniter is not yet available
22+
23+
If the `igniter.install` escript is not available. First, add `error_tracker` and `igniter` to your deps in `mix.exs`:
24+
25+
```elixir
26+
{:error_tracker, "~> 0.6"},
27+
{:igniter, "~> 0.5", only: [:dev]},
28+
```
29+
30+
Run `mix deps.get` to fetch the dependencies, then run the install task:
31+
32+
```bash
33+
mix error_tracker.install
34+
```
35+
36+
37+
## Manual Installation
1038

1139
The first step to add ErrorTracker to your application is to declare the package as a dependency in your `mix.exs` file:
1240

@@ -25,7 +53,7 @@ Once ErrorTracker is declared as a dependency of your application, you can insta
2553
mix deps.get
2654
```
2755

28-
## Configuring ErrorTracker
56+
### Configuring ErrorTracker
2957

3058
ErrorTracker needs a few configuration options to work. This configuration should be added to your `config/config.exs` file:
3159

@@ -42,7 +70,7 @@ The `:otp_app` option specifies your application name. When an error occurs, Err
4270

4371
The `:enabled` option (defaults to `true` if not present) allows to disable the ErrorTracker on certain environments. This is useful to avoid filling your dev database with errors, for example.
4472

45-
## Setting up the database
73+
### Setting up the database
4674

4775
Since ErrorTracker stores errors in the database you must create a database migration to add the required tables:
4876

0 commit comments

Comments
 (0)