Writing a Plugin
AngelConfigurer awesomeify({String message = 'This request was intercepted by an awesome plug-in.'}) {
return (Angel app) async {
app.fallback((req, res) async => res.write(message));
};
}
class MyAwesomePlugin {
@override
Future<void> configureServer(Angel app) async {
app.responseFinalizers.add((req, res) async {
res.headers['x-be-awesome'] = 'All the time :)';
});
}
}
await app.configure(MyAwesomePlugin().configureServer);Guidelines
Last updated