chore: replaced hardcoded values with env variables in app.module.ts, main.ts and utils.ts

This commit is contained in:
Balu Babu
2023-01-20 07:56:19 +05:30
parent 509604833e
commit a6ad86bd59
6 changed files with 22 additions and 7 deletions

View File

@@ -8,6 +8,10 @@ import { AuthModule } from './auth/auth.module';
@Module({
imports: [
GraphQLModule.forRoot<ApolloDriverConfig>({
cors: process.env.PRODUCTION !== 'true' && {
origin: ['http://localhost:3170', 'http://localhost:3000'],
credentials: true,
},
playground: process.env.PRODUCTION !== 'true',
debug: process.env.PRODUCTION !== 'true',
autoSchemaFile: true,