From 30f823be2a48d5b249376086305a466fc39d9056 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Wed, 11 Jul 2018 09:43:50 -0400 Subject: [PATCH] Update angel.dart --- lib/angel.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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)); }