Update angel.dart
This commit is contained in:
parent
6497b16e07
commit
30f823be2a
1 changed files with 5 additions and 5 deletions
|
@ -2,7 +2,6 @@
|
||||||
library angel;
|
library angel;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:angel_cors/angel_cors.dart';
|
|
||||||
import 'package:angel_framework/angel_framework.dart';
|
import 'package:angel_framework/angel_framework.dart';
|
||||||
import 'package:file/local.dart';
|
import 'package:file/local.dart';
|
||||||
import 'src/config/config.dart' as configuration;
|
import 'src/config/config.dart' as configuration;
|
||||||
|
@ -11,11 +10,12 @@ import 'src/services/services.dart' as services;
|
||||||
|
|
||||||
/// Configures the server instance.
|
/// Configures the server instance.
|
||||||
Future configureServer(Angel app) async {
|
Future configureServer(Angel app) async {
|
||||||
// Enable CORS
|
// Grab a handle to the file system, so that we can do things like
|
||||||
app.use(cors());
|
// serve static files.
|
||||||
|
var fs = const LocalFileSystem();
|
||||||
|
|
||||||
// Set up our application, using the plug-ins defined with this project.
|
// 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(services.configureServer);
|
||||||
await app.configure(routes.configureServer(const LocalFileSystem()));
|
await app.configure(routes.configureServer(fs));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue