diff --git a/lib/angel.dart b/lib/angel.dart index e7183f5..e4c6f76 100644 --- a/lib/angel.dart +++ b/lib/angel.dart @@ -2,7 +2,6 @@ library angel; import 'dart:async'; -import 'package:angel_cors/angel_cors.dart'; import 'package:angel_framework/angel_framework.dart'; import 'package:file/local.dart'; import 'src/config/config.dart' as configuration; @@ -11,11 +10,12 @@ import 'src/services/services.dart' as services; /// Configures the server instance. Future configureServer(Angel app) async { - // Enable CORS - app.use(cors()); + // Grab a handle to the file system, so that we can do things like + // serve static files. + var fs = const LocalFileSystem(); // Set up our application, using the plug-ins defined with this project. - await app.configure(configuration.configureServer(const LocalFileSystem())); + await app.configure(configuration.configureServer(fs)); await app.configure(services.configureServer); - await app.configure(routes.configureServer(const LocalFileSystem())); + await app.configure(routes.configureServer(fs)); }