configureServer method

  1. @mustCallSuper
Future<void> configureServer(
  1. Angel app
)

Applies routes, DI, and other configuration to an app.

Implementation

@mustCallSuper
Future<void> configureServer(Angel app) async {
  _app = app;

  if (injectSingleton != false) {
    if (!app.container.has(runtimeType)) {
      _app!.container.registerSingleton(this, as: runtimeType);
    }
  }

  var name = await applyRoutes(app, app.container.reflector);
  app.controllers[name] = this;
  //return null;
}