Skip to content

Instantly share code, notes, and snippets.

@felangel
Last active December 16, 2022 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felangel/749b4d4716bd2e3e4069eba07dcbed47 to your computer and use it in GitHub Desktop.
Save felangel/749b4d4716bd2e3e4069eba07dcbed47 to your computer and use it in GitHub Desktop.
Dart Frog Catch All Middleware
import 'package:dart_frog/dart_frog.dart';
Handler middleware(Handler handler) {
return Cascade().add(handler).add(catchAll).handler;
}
Response catchAll(RequestContext context) => Response(body: 'Catch All');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment