collection from env file + import nest-mongo

This commit is contained in:
Kfir Dayan 2023-04-18 21:07:34 +03:00
parent e775a58400
commit acb563b3a0
3 changed files with 1638 additions and 25 deletions

1651
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -26,6 +26,7 @@
"axios": "^1.3.5", "axios": "^1.3.5",
"dotenv": "^16.0.3", "dotenv": "^16.0.3",
"mongoose": "^7.0.4", "mongoose": "^7.0.4",
"nest-mongodb": "^6.4.0",
"puppeteer": "^19.9.1", "puppeteer": "^19.9.1",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"rxjs": "^7.5.5" "rxjs": "^7.5.5"

View file

@ -1,9 +1,14 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { MongoModule } from 'nest-mongodb'
import { ApiModule } from './api/api.module'; import { ApiModule } from './api/api.module';
import { CrawlerModule } from './crawler/crawler.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({ @Module({
imports: [ApiModule, CrawlerModule, DbModule] imports: [ApiModule, CrawlerModule, MongoModule.forRoot('mongodb://localhost', process.env.DB_NAME)]
}) })
export class AppModule { } export class AppModule { }