Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/modernize readme #26

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,11 @@ This is inspired by the Kickstarter's Rack::Attack middleware for Ruby.

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed as:

1. Add `plug_attack` to your list of dependencies in `mix.exs`:
Add `plug_attack` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[{:plug_attack, "~> 0.4.2"}]
end
```

2. If using Elixir 1.3, ensure that `plug_attack` is started before your application
(this step is no longer applicable to Elixir 1.4+):

```elixir
def application do
[applications: [:plug_attack]]
[{:plug_attack, "~> 0.4.3"}]
end
```

Expand Down Expand Up @@ -53,13 +42,6 @@ our supervision tree. This can be achieved by adding following to the
supervision tree:

```elixir
children = [
# other children
worker(PlugAttack.Storage.Ets, [MyApp.PlugAttack.Storage, [clean_period: 60_000]])
]

# or using child specifications:

children = [
{PlugAttack.Storage.Ets, name: MyApp.PlugAttack.Storage, clean_period: 60_000}
]
Expand Down