Phoenix v1.3.0-rc.2 Mix.Tasks.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 lib/my_app/channels
  • a channel_test in test/my_app/channels

Summary

Functions

A task needs to implement run which receives a list of command line args

Functions

run(args)

A task needs to implement run which receives a list of command line args.

Callback implementation for Mix.Task.run/1.