routed 0.1.0 copy "routed: ^0.1.0" to clipboard
routed: ^0.1.0 copied to clipboard

A modular HTTP engine and routing framework for Dart with middleware, configuration, sessions, and observability built in.

routed #

Routed is a modular HTTP engine for Dart that blends routing, middleware, and configuration into a single cohesive framework. It powers the rest of the routed ecosystem and ships with batteries included for sessions, caching, storage, observability, and authentication.

Features #

  • Declarative router with middleware, guards, and rich request/response helpers
  • Pluggable engine providers for configuration, observability, caching, uploads, and more
  • Session, JWT, and OAuth2 helpers built on the same primitives
  • First-class testing support via the routed_testing and server_testing packages
  • Hotwire/Turbo helpers and class-based views available through companion packages

Installation #

Add the package to your pubspec.yaml:

dependencies:
  routed: ^0.1.0

Then run dart pub get to install the dependency.

Getting started #

Create an engine, register routes, and start handling requests:

import 'package:routed/routed.dart';

Future<void> main() async {
  final engine = Engine();

  engine.get('/hello', (ctx) => ctx.string('Hello, world!'));

  await engine.serve(address: 'localhost', port: 8080);
}

See the examples in the example/ directory for more advanced scenarios including middleware, dependency injection, and WebSocket support.

License #

This project is licensed under the MIT License. See the LICENSE file for details.

0
likes
0
points
262
downloads

Publisher

unverified uploader

Weekly Downloads

A modular HTTP engine and routing framework for Dart with middleware, configuration, sessions, and observability built in.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

acanthis, collection, contextual, crypto, dartastic_opentelemetry, dartastic_opentelemetry_api, decimal, dotenv, encrypt, es_compression, event_bus, file, file_cloud, fuzzywuzzy, http, http2, http_parser, image, intl, jose, json2yaml, json_annotation, liquify, meta, mime, mustache_template, path, redis, shelf, stack_trace, storage_fs, timezone, uuid, xml, yaml

More

Packages that depend on routed