acept port setting by env variable

This commit is contained in:
João Geonizeli
2022-08-15 11:11:08 -03:00
parent f112e91e62
commit 61685a3063
2 changed files with 1 additions and 2 deletions

View File

@@ -20,7 +20,6 @@ import { httpCacheAdapter } from './utils/httpCacheAdapter';
GraphQLModule.forRoot<ApolloDriverConfig>({ GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver, driver: ApolloDriver,
autoSchemaFile: join(process.cwd(), 'src/schema.gql'), autoSchemaFile: join(process.cwd(), 'src/schema.gql'),
debug: true,
}), }),
], ],
providers: [ThingResolver], providers: [ThingResolver],

View File

@@ -3,6 +3,6 @@ import { AppModule } from './app.module';
async function bootstrap() { async function bootstrap() {
const app = await NestFactory.create(AppModule); const app = await NestFactory.create(AppModule);
await app.listen(3000); await app.listen(process.env.PORT || 3000);
} }
bootstrap(); bootstrap();