AE
Ash Elixir•2y ago
Korbin

Starting a Phoenix/Ash project with minimal cruft

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
mix phx.new my_cool_app --no-ecto
And then use Ash with AshPostgres.
5 Replies
ZachDaniel
ZachDaniel•2y ago
You can, yes 🙂
ZachDaniel
ZachDaniel•2y ago
that guide walks you through the setup for a non-phoenix app by default you may need to make some small adjustments to get the files in the right place but that should cover it
Korbin
KorbinOP•2y ago
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
ZachDaniel•2y ago
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 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 🙂

Did you find this page helpful?