Skip to content

Commit

Permalink
Event dispatching
Browse files Browse the repository at this point in the history
  • Loading branch information
kuchuk borom debbarma committed Dec 24, 2024
1 parent 96cd5e0 commit f0bcd74
Show file tree
Hide file tree
Showing 9 changed files with 391 additions and 55 deletions.
308 changes: 308 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"dependencies": {
"@nestjs/event-emitter": "^2.1.1",
"dataloader": "^2.2.3"
}
}
37 changes: 20 additions & 17 deletions youtag_nestjs/src/Utils/Constants.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
export namespace EnvironmentConst {
export namespace OAuth {
export namespace Google {
export const ClientID = 'OAUTH_GOOGLE_ID';
export const ClientSecret = 'OAUTH_GOOGLE_SECRET';
export const RedirectURI = 'OAUTH_GOOGLE_REDIRECT_URI';
export const Scopes = 'OAUTH_GOOGLE_SCOPES';
export namespace OAuth {
export namespace Google {
export const ClientID = 'OAUTH_GOOGLE_ID';
export const ClientSecret = 'OAUTH_GOOGLE_SECRET';
export const RedirectURI = 'OAUTH_GOOGLE_REDIRECT_URI';
export const Scopes = 'OAUTH_GOOGLE_SCOPES';
}
}
}

export namespace JWT {
export const Secret = 'JWT_SECRET';
export const Expiry = 'JWT_EXPIRY';
}
export namespace JWT {
export const Secret = 'JWT_SECRET';
export const Expiry = 'JWT_EXPIRY';
}

export namespace Db {
export const Host = 'DB_HOST';
export const Username = 'DB_USERNAME';
export const Password = 'DB_PWD';
export const DatabaseName = 'DB_NAME';
}
export namespace Db {
export const Host = 'DB_HOST';
export const Username = 'DB_USERNAME';
export const Password = 'DB_PWD';
export const DatabaseName = 'DB_NAME';
}
}
export namespace Events {
export const REMOVE_UNUSED_VIDEOS = "remove_unused_videos"
}
5 changes: 4 additions & 1 deletion youtag_nestjs/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ import {CommanderModule} from './commander/commander.module';
import * as path from 'node:path';
import * as process from 'node:process';
import {CacheModule} from '@nestjs/cache-manager';
import {EventEmitterModule} from "@nestjs/event-emitter";

@Module({
imports: [
CacheModule.register({
isGlobal: true,
ttl: 240000, //240 sec
ttl: 500000, //240 sec
}),
ConfigModule.forRoot({
envFilePath: '.env',
Expand Down Expand Up @@ -54,6 +55,8 @@ import {CacheModule} from '@nestjs/cache-manager';
plugins: [ApolloServerPluginLandingPageLocalDefault()], // Use Apollo Sandbox
context: () => ({})
}),
EventEmitterModule.forRoot({
}),
UserModule,
VideoModule,
TagModule,
Expand Down
Loading

0 comments on commit f0bcd74

Please sign in to comment.