bootApplication function

Future<Nylo> bootApplication(
  1. Map<Type, NyProvider> providers
)

Boots application providers.

See "config/providers" to add/modify providers

Implementation

Future<Nylo> bootApplication(Map<Type, NyProvider> providers) async {
  Nylo nylo = Nylo();
  for (var provider in providers.values) {
    Nylo? nyloObject = await provider.boot(nylo);
    if (nyloObject != null) {
      nylo = nyloObject;
    }
  }
  return nylo;
}