Trot v0.5.3

Modules summary

Mix.Tasks.Trot.Server

Starts Trot application with mix trot.server

Command line options

This task accepts the same command-line arguments as app.start. For additional information, refer to the documentation for Mix.Tasks.App.Start. For example, to run trot.server without checking dependencies: mix trot.server —no-deps-check

Trot

Main Trot application. When added to a projects application list, Trot.Supervisor will be started. Also contains some generic parsing functions

Trot.LiveReload

Plug for reloading modules on every request, allowing fast iteration during development

Trot.NotFound

Plug for inserting a 404 not found response

Trot.Router

Module for creating routes based on the URL path. Routes are specified using one of the HTTP method macros: get/2 post/2 put/2 patch/2 delete/2 options/2. The first argument is a the path to route to, and the second argument is the block of code to execute. See examples below

Trot.Template

Server side rendering of HTML using EEx templates. When the application is compiled all of templates under a given path are loaded and compiled for faster rendering. A render/2 function is generated for every template under the module attribute @template_root

Trot.Template.EEx

Templating engine for handling “.eex” files

Trot.Template.Engine

Defines the API for rendering a template format

Trot.Template.HAML

Templating engine for handling “.haml” files using Calliope

Trot.Versioning

Module for handling API versioning within requests