From 115adbeac456f568b872231fbfe08937746db207 Mon Sep 17 00:00:00 2001 From: Max Shane <73658023+wellloy1@users.noreply.github.com> Date: Wed, 30 Aug 2023 12:28:24 +0300 Subject: [PATCH 1/2] Update README.md --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ebf0148..6686ad8 100644 --- a/README.md +++ b/README.md @@ -539,14 +539,15 @@ container.loadModules([ formatName: 'camelCase', // Apply resolver options to all modules. resolverOptions: { - // We can give these auto-loaded modules - // the deal of a lifetime! (see what I did there?) - // By default it's `TRANSIENT`. - lifetime: Lifetime.SINGLETON, - // We can tell Awilix what to register everything as, - // instead of guessing. If omitted, will inspect the - // module to determine what to register as. - register: awilix.asClass + // We can give these auto-loaded modules + // the deal of a lifetime! (see what I did there?) + // By default it's `TRANSIENT`. + lifetime: Lifetime.SINGLETON, + // We can tell Awilix what to register everything as, + // instead of guessing. If omitted, will inspect the + // module to determine what to register as. + register: awilix.asClass + } } ) From 8e6db1793dd0c65e29eb6cfaf6a43b9629b25744 Mon Sep 17 00:00:00 2001 From: Max Shane <73658023+wellloy1@users.noreply.github.com> Date: Wed, 30 Aug 2023 13:24:33 +0300 Subject: [PATCH 2/2] Update README.md Changed my fix --- README.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6686ad8..75c80c4 100644 --- a/README.md +++ b/README.md @@ -539,17 +539,16 @@ container.loadModules([ formatName: 'camelCase', // Apply resolver options to all modules. resolverOptions: { - // We can give these auto-loaded modules - // the deal of a lifetime! (see what I did there?) - // By default it's `TRANSIENT`. - lifetime: Lifetime.SINGLETON, - // We can tell Awilix what to register everything as, - // instead of guessing. If omitted, will inspect the - // module to determine what to register as. - register: awilix.asClass - } + // We can give these auto-loaded modules + // the deal of a lifetime! (see what I did there?) + // By default it's `TRANSIENT`. + lifetime: Lifetime.SINGLETON, + // We can tell Awilix what to register everything as, + // instead of guessing. If omitted, will inspect the + // module to determine what to register as. + register: awilix.asClass } -) +}) // We are now ready! We now have a userService, userRepository and emailService! container.resolve('userService').getUser(1)