protevus/bin/prod.dart

30 lines
1.3 KiB
Dart
Raw Permalink Normal View History

2021-05-16 10:37:27 +00:00
import 'package:angel3_container/mirrors.dart';
import 'package:angel3_production/angel3_production.dart';
2021-06-14 00:02:15 +00:00
import 'package:angel/angel.dart';
2017-10-19 21:53:33 +00:00
2019-01-04 14:49:24 +00:00
// NOTE: By default, the Runner class does not use the `MirrorsReflector`, or any
// reflector, by default.
//
// If your application is using any sort of functionality reliant on annotations or reflection,
// either include the MirrorsReflector, or use a static reflector variant.
//
// The following use cases require reflection:
// * Use of Controllers, via @Expose() or @ExposeWS()
// * Use of dependency injection into constructors, whether in controllers or plain `container.make` calls
// * Use of the `ioc` function in any route
//
2019-01-04 14:49:24 +00:00
// The `MirrorsReflector` from `package:angel_container/mirrors.dart` is by far the most convenient pattern,
// so use it if possible.
//
// However, the following alternatives exist:
2022-04-26 00:20:54 +00:00
// * Generation via `package:angel3_container_generator`
2019-01-04 14:49:24 +00:00
// * Creating an instance of `StaticReflector`
// * Manually implementing the `Reflector` interface (cumbersome; not recommended)
//
// As of January 4th, 2018, the documentation has not yet been updated to state this,
// so in the meantime, visit the Angel chat for further questions:
//
// https://gitter.im/angel_dart/discussion
2021-03-07 12:45:40 +00:00
void main(List<String> args) =>
2022-04-26 00:20:54 +00:00
Runner('Angel3', configureServer, reflector: MirrorsReflector()).run(args);