protevus/lib/angel.dart

20 lines
734 B
Dart
Raw Normal View History

2016-04-22 02:56:21 +00:00
/// Your very own web application!
2016-04-29 01:22:53 +00:00
import 'dart:async';
2021-05-16 10:37:27 +00:00
import 'package:angel3_framework/angel3_framework.dart';
2017-10-19 21:53:33 +00:00
import 'package:file/local.dart';
2016-06-23 21:54:10 +00:00
import 'src/config/config.dart' as configuration;
import 'src/routes/routes.dart' as routes;
import 'src/services/services.dart' as services;
2016-04-22 02:56:21 +00:00
2017-10-19 21:53:33 +00:00
/// Configures the server instance.
Future configureServer(Angel app) async {
2018-07-11 13:43:50 +00:00
// Grab a handle to the file system, so that we can do things like
// serve static files.
var fs = const LocalFileSystem();
2016-04-22 02:56:21 +00:00
2017-10-19 21:53:33 +00:00
// Set up our application, using the plug-ins defined with this project.
2018-07-11 13:43:50 +00:00
await app.configure(configuration.configureServer(fs));
2016-06-23 21:54:10 +00:00
await app.configure(services.configureServer);
2018-07-11 13:43:50 +00:00
await app.configure(routes.configureServer(fs));
2017-04-11 18:18:52 +00:00
}