plug_rest v0.11.0 Mix.Tasks.PlugRest.Gen.Resource

Generates a PlugRest resource in your Plug application.

mix plug_rest.gen.resource UserResource

The generated resource will contain:

  • a resource file in lib/my_app/resources

The resources target directory can be changed with the option:

mix plug_rest.gen.resource UserResource --dir "web/resources"

In an umbrella project, run the mix task in the root of the app, or specify the app with:

mix plug_rest.gen.resource UserResource --app my_app

To create a resource with no tutorial comments:

mix plug_rest.gen.resource UserResource --no-comments

Summary

Functions

Callback implementation for Mix.Task.run/1

Functions

run(args)

Callback implementation for Mix.Task.run/1.