Open quarkw opened 1 year ago
Hi @quarkw thanks for letting us know that the instructions are incomplete. 👌
I am new to Phoenix/LiveView, but from other tutorials I have seen that nowadays it it possible to simply use sqlite3 as database. Since this is essentially just a file, there is no need for a running instance or any authorisation. Thanks to Ecto, the replacement would be easy and usually I would try co create a PR, but if I would have the knowledge how to be able to replace postgres with sqlite3 for this project, I probably would not need this tutorial in the first place ;)
On the other hand: I will try to follow the tutorial with mix phx.new live_view_todo --database sqlite3
and at the end I should be able to compare your code with the generated code and create a PR.
Ok, this wasn't that hard. I created PR #120.
@UweKrause indeed it is a viable option to run SQLite
with Phoenix
.
Our reasoning for not doing it on our beginner level tutorials
is that it's still exceedingly rare in "production" ... still considered "beta".
The default
is still Postgres
and is listed in the prerequisites in our tutorial:
https://github.com/dwyl/phoenix-chat-example#0-pre-requisites-before-you-start
which we consider to be the precursor to this tutorial.
Having said that, using SQLite
is a good option for lowering barriers to entry in a tutorial. 💭
This tutorial requires a running instance of postgresql on the default port on the local host, before running
mix phx.server
, but there's no mention of it.