collection from env file + import nest-mongo
This commit is contained in:
parent
e775a58400
commit
acb563b3a0
3 changed files with 1638 additions and 25 deletions
1651
package-lock.json
generated
1651
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -26,6 +26,7 @@
|
|||
"axios": "^1.3.5",
|
||||
"dotenv": "^16.0.3",
|
||||
"mongoose": "^7.0.4",
|
||||
"nest-mongodb": "^6.4.0",
|
||||
"puppeteer": "^19.9.1",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rxjs": "^7.5.5"
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { MongoModule } from 'nest-mongodb'
|
||||
import { ApiModule } from './api/api.module';
|
||||
import { CrawlerModule } from './crawler/crawler.module';
|
||||
import { DbModule } from './db/db.module';
|
||||
// import { DbModule } from './db/db.module';
|
||||
const dotenv = require('dotenv');
|
||||
|
||||
dotenv.config();
|
||||
|
||||
|
||||
@Module({
|
||||
imports: [ApiModule, CrawlerModule, DbModule]
|
||||
imports: [ApiModule, CrawlerModule, MongoModule.forRoot('mongodb://localhost', process.env.DB_NAME)]
|
||||
})
|
||||
export class AppModule {}
|
||||
export class AppModule { }
|
||||
|
|
Loading…
Reference in a new issue