View Source YaBTTWeb.Router (YaBTT v0.1.5)

Plug router for the Tracker application.

This module is responsible for routing incoming requests to the appropriate controller action.

The router is responsible for:

  • Logging all requests
  • Parsing the request body
  • Routing the request to the appropriate controller action
  • Returning a response to the client

The router is not responsible for:

  • Performing any business logic

The router is a Plug, which is a module that conforms to the Plug specification. A Plug is a module that implements a call/2 function that takes a Plug.Conn struct and returns a Plug.Conn struct.

Link to this section Summary

Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Link to this section Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.