Custom mix statement

Hi all

I can start my phoenix application as follow:

mix phoenix.server

My question, how can I create an own statement like above, for example mix cdb.start

Thanks

2 Likes

https://elixirschool.com/lessons/basics/mix-tasks/

4 Likes

You need to implement Mix.Task-behaviour for a module, that corresponds to your command name.

For mix cdb.start, you need to do this for the module Mix.Tasks.Cdb.Start.

4 Likes

Thanks so much guys.