acept port setting by env variable
This commit is contained in:
@@ -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],
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user