Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuprog committed May 1, 2021
1 parent 37e1810 commit 1e20af5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,25 @@ If you do not wish to update automatically, but still wish to be alerted for new

This will simply log to your server when a new time zone database is available.

To avoid the updater to run while executing tests, you may conditionally add the child worker in your supervisor. For
example:

```elixir
children = [
MyApp.RepoBase,
MyApp.Endpoint,
]
|> append_if(Application.get_env(:my_app, :env) != :test, {Tz.UpdatePeriodically, []})
```

```elixir
defp append_if(list, condition, item) do
if condition, do: list ++ [item], else: list
end
```

In `config.exs`, add `config :calendar_storefront, env: Mix.env()`.

Lastly, add the http client `mint` and ssl certificate store `castore` into your `mix.exs` file:

```elixir
Expand Down

0 comments on commit 1e20af5

Please sign in to comment.