Added pub serve layer

This commit is contained in:
thosakwe 2016-11-23 17:30:41 -05:00
parent 359df0bf92
commit 7829666277
2 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,7 @@
library angel.routes; library angel.routes;
import 'package:angel_framework/angel_framework.dart'; import 'package:angel_framework/angel_framework.dart';
import 'package:angel_proxy/angel_proxy.dart';
import 'package:angel_static/angel_static.dart'; import 'package:angel_static/angel_static.dart';
import 'controllers/controllers.dart' as Controllers; import 'controllers/controllers.dart' as Controllers;
@ -10,7 +11,8 @@ configureBefore(Angel app) async {}
/// Put your app routes here! /// Put your app routes here!
configureRoutes(Angel app) async { configureRoutes(Angel app) async {
app.get('/', (req, ResponseContext res) => res.render('hello')); 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 { configureAfter(Angel app) async {

View file

@ -11,6 +11,7 @@ dependencies:
angel_framework: ^1.0.0-dev angel_framework: ^1.0.0-dev
angel_mongo: ^1.0.0-dev angel_mongo: ^1.0.0-dev
angel_mustache: ^1.0.0-dev angel_mustache: ^1.0.0-dev
angel_proxy: ^1.0.0-dev
angel_static: ^1.1.0-dev angel_static: ^1.1.0-dev
json_god: ^2.0.0-beta json_god: ^2.0.0-beta
mailer: ^1.1.0+4 mailer: ^1.1.0+4