nestjs-security-cli 1.5.7 → 1.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,6 +40,22 @@ export class AppModule {
|
|
|
40
40
|
}
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
## DATABASE_CONNECTION provider
|
|
44
|
+
|
|
45
|
+
if you're needing to use the database connection, and the import options isn't working, you can try to pass it directly
|
|
46
|
+
into the providers array.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
{
|
|
50
|
+
provide: 'DATABASE_CONNECTION',
|
|
51
|
+
inject: [ConfigService],
|
|
52
|
+
useFactory: (configService: ConfigService): Promise<typeof mongoose> => {
|
|
53
|
+
return mongoose.connect(configService.get<string>('DATABASE_HOST'), {
|
|
54
|
+
dbName: configService.get<string>('DATABASE_NAME')
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
43
59
|
## with forRoot
|
|
44
60
|
|
|
45
61
|
```typescript
|
|
@@ -284,7 +300,4 @@ export interface SecurityConfigInterface {
|
|
|
284
300
|
|
|
285
301
|
## License
|
|
286
302
|
|
|
287
|
-
MIT
|
|
288
|
-
|
|
289
|
-
## Donate
|
|
290
|
-
If you like this project, please consider [donating to help me keep it up to date](https://buy.stripe.com/eVq00l2Dc4k05Bz9pY4Rq00)
|
|
303
|
+
MIT
|
package/package.json
CHANGED