W3cubDocs

/Phoenix

mix phx.gen.channel

Generates a Phoenix channel.

mix phx.gen.channel Room

Accepts the module name for the channel

The generated files will contain:

For a regular application:

  • a channel in lib/my_app_web/channels
  • a channel_test in test/my_app_web/channels

For an umbrella application:

  • a channel in apps/my_app_web/lib/app_name_web/channels
  • a channel_test in apps/my_app_web/test/my_app_web/channels

© 2014 Chris McCord
Licensed under the MIT License.
https://hexdocs.pm/phoenix/Mix.Tasks.Phx.Gen.Channel.html