Ir al contenido principal
Plug logo

Plug

Compose web applications with functions

Plug is a specification and toolkit for composing web applications with functions in Elixir. It provides a unified interface for handling HTTP connections and is the foundational layer used by Phoenix and other Elixir frameworks for request handling, routing, and WebSocket support.

3K
GitHub Stars
medium
Learning Curve
4.0
DX Score

Precios

Model
free
Plan Gratuito
Free and open-source under Apache License 2.0.

Características

  • Module and function plug patterns
  • Built-in Plug.Router for request dispatch
  • WebSocket support via connection upgrade API
  • Composable middleware pipeline
  • Extremely fast route lookups
  • Pre-built plugs for common tasks
  • CSRF protection and session management
  • SSL enforcement
  • Static file serving
  • Plug.Test for testing

Ventajas

  • + Framework-agnostic and lightweight
  • + Supports multiple web servers (Cowboy, Bandit)
  • + Immutable connection model for safe concurrency
  • + Direct access to streaming capabilities
  • + Foundation for Phoenix framework

Desventajas

  • - Requires external webserver dependency
  • - Steeper learning curve for non-Elixir developers
  • - Smaller ecosystem than Node.js alternatives
  • - Limited to BEAM/Elixir runtime

Mejor Para

indie hacker startup

Alternativas

elixir erlang beam web middleware http websocket