Removed 'before'/'after'
This commit is contained in:
parent
3d7b71f3dd
commit
7b69a6522e
3 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ main() async {
|
|||
});
|
||||
|
||||
// Proxy any other request through to dartlang.org
|
||||
app.after.add(angelHandler);
|
||||
app.use(angelHandler);
|
||||
|
||||
var server = await app.startServer(InternetAddress.LOOPBACK_IP_V4, 8080);
|
||||
print('Proxying at http://${server.address.host}:${server.port}');
|
||||
|
|
|
@ -12,7 +12,7 @@ import 'convert.dart';
|
|||
/// * `angel_shelf.response` - The Angel [ResponseContext].
|
||||
AngelConfigurer supportShelf() {
|
||||
return (Angel app) async {
|
||||
app.before.add((RequestContext req, ResponseContext res) async {
|
||||
app.use((RequestContext req, ResponseContext res) async {
|
||||
// Inject shelf.Request ;)
|
||||
req.inject(
|
||||
shelf.Request,
|
||||
|
|
|
@ -38,7 +38,7 @@ main() {
|
|||
|
||||
var app = new Angel()..lazyParseBodies = true;
|
||||
app.get('/angel', 'Angel');
|
||||
app.after.add(embedShelf(handler, throwOnNullResponse: true));
|
||||
app.use(embedShelf(handler, throwOnNullResponse: true));
|
||||
await app.configure(logRequests());
|
||||
|
||||
server = await app.startServer(InternetAddress.LOOPBACK_IP_V4, 0);
|
||||
|
|
Loading…
Reference in a new issue