Search documentation of Phoenix

# API Reference Phoenix v#1.8.7

View Source

## Modules

Phoenix

This is the documentation for the Phoenix project.

Phoenix.ActionClauseError
Phoenix.Channel

Defines a Phoenix Channel.

Phoenix.ChannelTest

Conveniences for testing Phoenix channels.

Phoenix.CodeReloader

A plug and module to handle automatic code reloading.

Phoenix.ConnTest

Conveniences for testing Phoenix endpoints and connection related helpers.

Phoenix.Controller

Controllers are used to group common functionality in the same (pluggable) module.

Phoenix.Debug

Functions for runtime introspection and debugging of Phoenix applications.

Phoenix.Digester.Compressor

Defines the `Phoenix.Digester.Compressor` behaviour for implementing static file compressors.

Phoenix.Digester.Gzip

Gzip compressor for Phoenix.Digester

Phoenix.Endpoint

Defines a Phoenix endpoint.

Phoenix.Endpoint.Cowboy2Adapter

The Cowboy2 adapter for Phoenix.

Phoenix.Endpoint.SyncCodeReloadPlug

Wraps an Endpoint, attempting to sync with Phoenix's code reloader if an exception is raised which indicates that we may be in the middle of a reload.

Phoenix.Flash

Provides shared flash access.

Phoenix.Logger

Instrumenter to handle logging of various instrumentation events.

Phoenix.MissingParamError

Raised when a key is expected to be present in the request parameters, but is not.

Phoenix.Naming

Conveniences for inflecting and working with names in Phoenix.

Phoenix.NotAcceptableError

Raised when one of the `accept*` headers is not accepted by the server.

Phoenix.Param

A protocol that converts data structures into URL parameters.

Phoenix.Presence

Provides Presence tracking to processes and channels.

Phoenix.Router

Defines a Phoenix router.

Phoenix.Router.MalformedURIError

Exception raised when the URI is malformed on matching.

Phoenix.Router.NoRouteError

Exception raised when no route is found.

Phoenix.Socket

A socket implementation that multiplexes messages over channels.

Phoenix.Socket.Broadcast

Defines a message sent from pubsub to channels and vice-versa.

Phoenix.Socket.InvalidMessageError

Raised when the socket message is invalid.

Phoenix.Socket.Message

Defines a message dispatched over transport to channels and vice-versa.

Phoenix.Socket.Reply

Defines a reply sent from channels to transports.

Phoenix.Socket.Serializer

A behaviour that serializes incoming and outgoing socket messages.

Phoenix.Socket.Transport

Outlines the Socket <-> Transport communication.

Phoenix.Token

Conveniences to sign/encrypt data inside tokens for use in Channels, API authentication, and more.

Phoenix.VerifiedRoutes

Provides route generation with compile-time verification.

## Mix Tasks

mix local.phx

Updates the Phoenix project generator locally.

mix phx

Prints Phoenix tasks and their information.

mix phx.digest

Digests and compresses static files.

mix phx.digest.clean

Removes old versions of compiled assets.

mix phx.gen

Lists all available Phoenix generators.

mix phx.gen.auth

Generates authentication logic and related views for a resource.

mix phx.gen.cert

Generates a self-signed certificate for HTTPS testing.

mix phx.gen.channel

Generates a Phoenix channel.

mix phx.gen.context

Generates a context with functions around an Ecto schema.

mix phx.gen.embedded

Generates an embedded Ecto schema for casting/validating data outside the DB.

mix phx.gen.html

Generates controller with view, templates, schema and context for an HTML resource.

mix phx.gen.json

Generates controller, JSON view, and context for a JSON resource.

mix phx.gen.live

Generates LiveView, templates, and context for a resource.

mix phx.gen.notifier

Generates a notifier that delivers emails by default.

mix phx.gen.presence

Generates a Presence tracker.

mix phx.gen.release

Generates release files and optional Dockerfile for release-based deployments.

mix phx.gen.schema

Generates an Ecto schema and migration.

mix phx.gen.secret

Generates a secret and prints it to the terminal.

mix phx.gen.socket

Generates a Phoenix socket handler.

mix phx.new

Creates a new Phoenix project.

mix phx.new.ecto

Creates a new Ecto project within an umbrella project.

mix phx.new.web

Creates a new Phoenix web project within an umbrella project.

mix phx.routes

Prints all routes for the default or a given router. Can also locate the controller function behind a specified url.

mix phx.server

Starts the application by configuring all endpoints servers to run.