From 78296662774f80e3e9f0f84a7f378c33a617b80d Mon Sep 17 00:00:00 2001 From: thosakwe Date: Wed, 23 Nov 2016 17:30:41 -0500 Subject: [PATCH] Added pub serve layer --- lib/src/routes/routes.dart | 4 +++- pubspec.yaml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/routes/routes.dart b/lib/src/routes/routes.dart index 644a097..b5ea85a 100644 --- a/lib/src/routes/routes.dart +++ b/lib/src/routes/routes.dart @@ -2,6 +2,7 @@ library angel.routes; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_proxy/angel_proxy.dart'; import 'package:angel_static/angel_static.dart'; import 'controllers/controllers.dart' as Controllers; @@ -10,7 +11,8 @@ configureBefore(Angel app) async {} /// Put your app routes here! configureRoutes(Angel app) async { app.get('/', (req, ResponseContext res) => res.render('hello')); - app.all('*', new VirtualDirectory()); + await app.configure(new PubServeLayer()); + await app.configure(new VirtualDirectory()); } configureAfter(Angel app) async { diff --git a/pubspec.yaml b/pubspec.yaml index 5470295..3f49025 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,6 +11,7 @@ dependencies: angel_framework: ^1.0.0-dev angel_mongo: ^1.0.0-dev angel_mustache: ^1.0.0-dev + angel_proxy: ^1.0.0-dev angel_static: ^1.1.0-dev json_god: ^2.0.0-beta mailer: ^1.1.0+4