UNPKG
nestjs-starter
Version:
latest (0.1.5)
0.1.5
0.1.4
0.1.3
0.1.2
Get started for beginners with Nestjs
github.com/pktai/nestjs-starter
pktai/nestjs-starter
nestjs-starter
/
src
/
modules
/
database
/
no_sql
/
mongo.module.ts
11 lines
(8 loc)
•
300 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
mongoose
from
'mongoose'
;
import
{
DATABASE_CONNECTION
}
from
'./enumuration'
; mongoose.
set
(
'debug'
,
true
);
export
const
databaseNoSqlProviders = {
provide
:
DATABASE_CONNECTION
,
useFactory
: ():
Promise
<
typeof
mongoose> => mongoose.
connect
(
String
(process.
env
.
MONGO_DB
)), };