diff --git a/bin/dev.dart b/bin/dev.dart index 5514cc7..fad7971 100644 --- a/bin/dev.dart +++ b/bin/dev.dart @@ -8,7 +8,7 @@ import 'package:logging/logging.dart'; main() async { // Watch the config/ and web/ directories for changes, and hot-reload the server. var hot = new HotReloader(() async { - var app = new Angel()..lazyParseBodies = true; + var app = new Angel(); await app.configure(configureServer); hierarchicalLoggingEnabled = true; app.logger = new Logger('angel'); diff --git a/lib/src/routes/routes.dart b/lib/src/routes/routes.dart index 43206d9..be32ed5 100644 --- a/lib/src/routes/routes.dart +++ b/lib/src/routes/routes.dart @@ -39,11 +39,11 @@ AngelConfigurer configureServer(FileSystem fileSystem) { fileSystem, source: fileSystem.directory('web'), ); - app.use(vDir.handleRequest); + app.fallback(vDir.handleRequest); } // Throw a 404 if no route matched the request. - app.use(() => throw new AngelHttpException.notFound()); + app.fallback((req, res) => throw new AngelHttpException.notFound()); // Set our application up to handle different errors. // diff --git a/pubspec.yaml b/pubspec.yaml index d18a39f..78a1f47 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,16 +5,15 @@ environment: sdk: '>=2.0.0-dev <3.0.0' homepage: https://github.com/angel-dart/angel dependencies: - angel_auth: ^1.1.0 # Supports stateless authentication via JWT - angel_configuration: ^1.2.0 # Loads application configuration, along with support for .env files. - angel_cors: ^1.0.0 # CORS support - angel_framework: ^1.1.0 # The core server library. - angel_jael: ^1.0.0 # Server-side templating engine - angel_static: ^1.3.0 # Static file server - angel_validate: ^1.0.0 # Allows for validation of input data - dart2_constant: ^1.0.0 # For backwards compatibility. + angel_auth: ^2.0.0-alpha # Supports stateless authentication via JWT + angel_configuration: ^2.0.0 # Loads application configuration, along with support for .env files. + #angel_cors: ^1.0.0 # CORS support + angel_framework: ^2.0.0-alpha # The core server library. + #angel_jael: ^1.0.0 # Server-side templating engine + angel_static: ^2.0.0-alpha # Static file server + angel_validate: ^2.0.0-alpha # Allows for validation of input data dev_dependencies: - angel_hot: ^1.1.0 # Hot-reloading support. :) - angel_test: ^1.1.0 # Utilities for testing Angel servers. + #angel_hot: ^1.1.0 # Hot-reloading support. :) + angel_test: ^2.0.0-alpha # Utilities for testing Angel servers. io: ^0.3.2 - test: ^0.12.13 + test: ^1.0.0