Starting a Phoenix/Ash project with minimal cruft
korbin.mcgee:
Howdy there. I’ve been trying the tutorials from the Ash website (both “Get Started” and “Get Started with Ash and Phoenix”). As I was going through, I couldn’t help but wonder, “ is there a way to do this without Phoenix’s Ecto? “
In other words, if I’m planning on using Ash for all the domain logic, and Ash is going to use Ecto, can I initialize Pheonix without ecto and still get Ash to work right (since I’ll be using Ecto with it)?
Context:
mix phx.new my_cool_app --no-ecto
And then use Ash with AshPostgres.
zachdaniel:
You can, yes 🙂
zachdaniel:
that guide walks you through the setup for a non-phoenix app by default
zachdaniel:
you may need to make some small adjustments to get the files in the right place
zachdaniel:
but that should cover it
korbin.mcgee:
Wow, this is such a “duh” moment. I assumed since the Phoenix guide didn’t mention initializing Phoenix without Ecto meant there was some kind of plumbing that Ash relied on there in AshPhoenix
zachdaniel:
ah, not really, its just a matter of the guide is way simpler if we tell you how to modify the existing stuff than to set up your own. You mostly end up needing the same things FWIW
zachdaniel:
but its worth setting up yourself to see what pieces are needed, its only like a few minutes difference at the end of the day 🙂