init static method

Future<Nylo> init({
  1. required dynamic router,
  2. Function? setup,
})

Run to init Nylo

Implementation

static Future<Nylo> init({required router, Function? setup}) async {
  await dotenv.load(fileName: ".env");

  if (setup != null) {
    await setup();
  }
  return Nylo(router: router);
}