Update routes.dart
This commit is contained in:
parent
30f823be2a
commit
086edc4fe6
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
/// This app's route configuration.
|
||||
library angel.src.routes;
|
||||
|
||||
import 'package:angel_cors/angel_cors.dart';
|
||||
import 'package:angel_framework/angel_framework.dart';
|
||||
import 'package:angel_static/angel_static.dart';
|
||||
import 'package:file/file.dart';
|
||||
|
@ -13,6 +14,9 @@ import 'controllers/controllers.dart' as controllers;
|
|||
/// * https://github.com/angel-dart/angel/wiki/Requests-&-Responses
|
||||
AngelConfigurer configureServer(FileSystem fileSystem) {
|
||||
return (Angel app) async {
|
||||
// Enable CORS
|
||||
app.use(cors());
|
||||
|
||||
// Typically, you want to mount controllers first, after any global middleware.
|
||||
await app.configure(controllers.configureServer);
|
||||
|
||||
|
|
Loading…
Reference in a new issue