added mongod module + created schema file

This commit is contained in:
Kfir Dayan 2023-04-18 21:31:33 +03:00
parent 4b7d4d9022
commit 9d3e39683c
2 changed files with 15 additions and 3 deletions

View file

@ -2,13 +2,17 @@ import { Module } from '@nestjs/common';
import { MongoModule } from 'nest-mongodb' 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';
const dotenv = require('dotenv');
// import { DbModule } from './db/db.module'; // import { DbModule } from './db/db.module';
import dotenv from 'dotenv';
dotenv.config(); dotenv.config();
console.log(process)
@Module({ @Module({
imports: [ApiModule, CrawlerModule, MongoModule.forRoot('mongodb://localhost', process.env.DB_NAME)] imports: [
MongoModule.forRoot(process.env.DB_URI, process.env.DB_NAME),
ApiModule,
CrawlerModule
]
}) })
export class AppModule { } export class AppModule { }

View file

@ -0,0 +1,8 @@
import { ObjectId } from 'mongodb';
export interface Cat {
_id: ObjectId;
domain: string;
cssSheetsLocation: string[];
scriptsSheetsLocation: string[];
}