docs: helpful step on getting started guide

This commit is contained in:
Zach Daniel 2023-09-04 18:47:51 -04:00
parent 50c2aef27a
commit 5634d45663

View file

@ -307,15 +307,24 @@ end
```elixir
defmodule Example.Accounts do
use Ash.Api
use Ash.Api
resources do
resource Example.Accounts.User
resource Example.Accounts.Token
end
resources do
resource Example.Accounts.User
resource Example.Accounts.Token
end
end
```
### Add to config
Although mentioned in a step at the top, a common mistake here is not to add the new api into your `ash_apis` config in `config/config.exs`. It should look like this:
```elixir
config :example,
ash_apis: [..., Example.Accounts]
```
### Create and Migration
Now is a good time to create the database and run the migrations. You have to use specific `ash_postgres` mix tasks for that: