crawling-and-serving/src/app.module.ts

20 lines
458 B
TypeScript

import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { ApiModule } from './api/api.module';
import { CrawlerModule } from './crawler/crawler.module';
const dotenv = require('dotenv');
dotenv.config();
@Module({
imports: [
MongooseModule.forRoot(process.env.DB_URI, {
useNewUrlParser: true,
useUnifiedTopology: true,
}),
ApiModule,
CrawlerModule
]
})
export class AppModule { }