-
Notifications
You must be signed in to change notification settings - Fork 7
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
Create a UI to allow people to interact with the example? #17
Comments
The reason I think that this example is highly relevant and useful both to us (@dwyl) and to anyone else wanting to understand both the "Why?" and "How?" of append-only (accountable) application architecture is that having a simple example without any dependencies makes it clear how everything works. I'm going to make a stab at the todo list above.
|
Going to try and use Take the
Gen HTML:
Got the following error:
In my own "throw away" example: https://github.com/nelsonic/append-only-log-ex mix ecto.drop && MIX_ENV=test mix ecto.drop You should expect to see:
Try running the Gen HTML command again:
That failed because the address.ex file already exists. After deleting the files, let's attempt to run the
Derp, we need to add the context! Error message:
Add the "Accounts" context to the the
This time it worked: 🎉
|
Going to follow the instructions given after running the resources "/addresses", AddressController Update your repository by running migrations:
Fails:
Run the drop command:
Then run the migrate command again:
Output: (success)
Run the mix phx.server command to start the server:
Visit the app in the browser: http://localhost:4000/addresses |
With the addition of the Now we can run the migrate:
Output:
|
Run the app Now attempt to edit the address: http://localhost:4000/addresses/1/edit Fails because we revoked the UPDATE privileges in our migration (above): |
The question we have to ask ourselves now is: are we going to use the default phoenix auto-incrementing id (in the above case |
in the
To:
|
No changes were required to the
In the tutorial, remember to change all instances of Remember to link to the issue discussing merits of macros: #8 |
Minor detour (SPIKE) to investigate storing history of a record: dwyl/ecto-postgres-pubsub-spike#1 |
Reading the example/tutorial code is nice, 👍
but I feel that having an example app on Heroku would be much more beginner-friendly. 🤔
Who wants to make this happen? :-)
Example: https://github.com/dwyl/phoenix-chat-example
Todo
The text was updated successfully, but these errors were encountered: