-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.module.ts
85 lines (77 loc) · 3.1 KB
/
app.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import { Module } from '@nestjs/common';
import * as Joi from 'joi';
import { ConfigModule } from '@nestjs/config';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { DatabaseModule } from './database/database.module';
import { MovieModule } from './movies/movie.module';
import { UsersModule } from './users/users.module';
import { AuthModule } from './auth/auth.module';
import { ReviewsModule } from './reviews/reviews.module';
import { PeopleModule } from './people/people.module';
import { TheatersModule } from './theaters/theaters.module';
import { SeatsModule } from './seats/seats.module';
import { ReservationsModule } from './reservations/reservations.module';
import { ProductsModule } from './products/products.module';
import { ShowtimesModule } from './showtimes/showtimes.module';
import { GroupTheaterModule } from './group-theater/group-theater.module';
import { GenresModule } from './genres/genres.module';
import { TicketsModule } from './tickets/tickets.module';
import { StripeModule } from './stripe/stripe.module';
import { CardsModule } from './cards/cards.module';
import { NewsModule } from './news/news.module';
@Module({
imports: [
ConfigModule.forRoot({
validationSchema: Joi.object({
POSTGRES_HOST: Joi.string().required(),
POSTGRES_PORT: Joi.number().required(),
POSTGRES_USER: Joi.string().required(),
POSTGRES_PASSWORD: Joi.string().required(),
POSTGRES_DB: Joi.string().required(),
PORT: Joi.number(),
JWT_ACCESS_TOKEN_SECRET: Joi.string().required(),
JWT_ACCESS_TOKEN_EXPIRATION_TIME: Joi.string().required(),
JWT_REFRESH_TOKEN_SECRET: Joi.string().required(),
JWT_REFRESH_TOKEN_EXPIRATION_TIME: Joi.string().required(),
EMAIL_SERVICE: Joi.string().required(),
EMAIL_USER: Joi.string().required(),
EMAIL_PASSWORD: Joi.string().required(),
JWT_VERIFICATION_TOKEN_SECRET: Joi.string().required(),
JWT_VERIFICATION_TOKEN_EXPIRATION_TIME: Joi.string().required(),
EMAIL_CONFIRMATION_URL: Joi.string().required(),
JWT_FORGOT_PASSWORD_TOKEN_SECRET: Joi.string().required(),
JWT_FORGOT_PASSWORD_EXPIRATION_TIME: Joi.string().required(),
EMAIL_FORGOT_PASSWORD_URL: Joi.string().required(),
AWS_REGION: Joi.string().required(),
AWS_ACCESS_KEY_ID: Joi.string().required(),
AWS_SECRET_ACCESS_KEY: Joi.string().required(),
AWS_PUBLIC_BUCKET_NAME: Joi.string().required(),
//PAYMENT WITH STRIPE
STRIPE_SECRET_KEY: Joi.string().required(),
STRIPE_CURRENCY: Joi.string().required(),
FRONTEND_URL: Joi.string().required(),
}),
}),
DatabaseModule,
UsersModule,
MovieModule,
AuthModule,
ReviewsModule,
PeopleModule,
TheatersModule,
SeatsModule,
ReservationsModule,
ProductsModule,
ShowtimesModule,
GroupTheaterModule,
GenresModule,
TicketsModule,
StripeModule,
CardsModule,
NewsModule,
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}