You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+19
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,25 @@ export class MyAppModule {}
53
53
54
54
For sake of simplicity the database credentials are passed directly to the register function in the example but in a production environment you'd want to use [`@nestjs/config`](https://docs.nestjs.com/techniques/configuration) instead.
55
55
56
+
`NarangoModule` can be registered as a global module through the `global` option:
57
+
58
+
```ts
59
+
imports: [
60
+
NarangoModule.register({
61
+
global: true,
62
+
database: {
63
+
url: "http://localhost:8529",
64
+
databaseName: "MyDatabase",
65
+
auth: {
66
+
username: "userDB",
67
+
password: "secretPassword",
68
+
},
69
+
},
70
+
}),
71
+
],
72
+
73
+
```
74
+
56
75
## Inject NarangoService
57
76
58
77
Now you can access the `NarangoService` everywhere you need it in your application:
0 commit comments