View Source PhoenixPlayground (phoenix_playground v0.1.6)

Phoenix Playground makes it easy to create single-file Phoenix applications.

Summary

Functions

Starts Phoenix Playground.

Functions

Starts Phoenix Playground.

This functions starts Phoenix with a LiveView (:live), a controller (:controller), or a router (:router).

Options

  • :live - a LiveView module.

    Phoenix Playground adds the following conveniences to the given LiveView:

    • a :page_title assign can be used to customise <head> <title> tag.

    • a window.hooks object can be used to register hooks. See examples/demo_hooks.exs.

    This LiveView will automatically use PhoenixPlayground.Layout.

  • :controller - a controller module.

    This controller will automatically use PhoenixPlayground.Layout.

  • :plug - a plug.

  • :port - port to listen on, defaults to: 4000.

  • :endpoint_options - additional Phoenix endpoint options, defaults to [].

  • :debug_errors - whether to use Phoenix error debugger, defaults to true.

  • :open_browser - whether to open the browser on start, defaults to true.

  • :child_specs - child specs to run in Phoenix Playground supervision tree. The playground Phoenix endpoint is automatically added and is always the last child spec. Defaults to [].