shelf_openrouter 0.0.1 copy "shelf_openrouter: ^0.0.1" to clipboard
shelf_openrouter: ^0.0.1 copied to clipboard

Fast and extensible routing for the shelf ecosystem.

example/example.dart

import 'package:shelf/shelf.dart';
import 'package:shelf/shelf_io.dart' as shelf_io;
import 'package:shelf_openrouter/shelf_openrouter.dart';

void main() async {
  var router = ShelfOpenRouter();
  router.get("/api/v1/hello", (Request request) {
    return Response.ok("Hello");
  });
  router.get("/api/v1/hello/:name", (Request request, String name) {
    return Response.ok("Hello $name");
  });

  await shelf_io.serve(router.call, 'localhost', 8080);
}
0
likes
140
pub points
0%
popularity

Publisher

verified publisherhelight.dev

Fast and extensible routing for the shelf ecosystem.

Repository (GitHub)
View/report issues

Topics

#shelf #routing #http

Documentation

API reference

License

MIT-0 (license)

Dependencies

shelf

More

Packages that depend on shelf_openrouter