Sinatra is a DSL (Domain Specific Language) for quickly creating web applications in Ruby with minimal effort. It is lightweight compared to full MVC frameworks; you define routes (HTTP method + URL pattern) and blocks that handle requests. It leverages Rack for middleware, supports rendering via templates, static file serving, filtering (before/after), helpers, error handling, etc. It's often used for small to medium web services, APIs, and micro-apps.
Features
- Routing via HTTP verbs (GET, POST, PUT, DELETE, PATCH, OPTIONS etc) with named and wildcard parameters
- Template rendering with support for many template engines (ERB, Haml, Slim, Markdown, Liquid, etc.)
- Filters (before / after) and helpers for common request/response logic
- Static file serving, with configuration for public folder, static headers, cache control etc.
- Error handling, lifecycle events, environment configurations (development/production/test)
- Middleware integration: can use Rack middleware, modular or classic style apps, mounting, etc.
Categories
Web DevelopmentLicense
MIT LicenseFollow Sinatra
nel_h2
Keep company data safe with Chrome Enterprise
Make AI work your way with Chrome Enterprise. Block unapproved sites and set custom data controls that align with your company's policies.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of Sinatra!