2023-04-16 20:00:55 +00:00
|
|
|
import { Module } from '@nestjs/common';
|
2023-04-18 22:47:05 +00:00
|
|
|
import { MongooseModule } from '@nestjs/mongoose';
|
2023-04-17 16:01:05 +00:00
|
|
|
import { ApiModule } from './api/api.module';
|
|
|
|
import { CrawlerModule } from './crawler/crawler.module';
|
2023-04-18 18:31:33 +00:00
|
|
|
const dotenv = require('dotenv');
|
2023-04-18 18:07:34 +00:00
|
|
|
|
|
|
|
dotenv.config();
|
|
|
|
|
2023-04-16 20:00:55 +00:00
|
|
|
@Module({
|
2023-04-18 18:31:33 +00:00
|
|
|
imports: [
|
2023-04-18 22:47:05 +00:00
|
|
|
MongooseModule.forRoot(process.env.DB_URI, {
|
|
|
|
useNewUrlParser: true,
|
|
|
|
useUnifiedTopology: true,
|
|
|
|
}),
|
2023-04-18 18:31:33 +00:00
|
|
|
ApiModule,
|
|
|
|
CrawlerModule
|
|
|
|
]
|
2023-04-18 22:47:05 +00:00
|
|
|
|
2023-04-16 20:00:55 +00:00
|
|
|
})
|
2023-04-18 18:07:34 +00:00
|
|
|
export class AppModule { }
|