diff --git a/backend/src/config/configuration.ts b/backend/src/config/configuration.ts index 2c2e6e7..397523d 100644 --- a/backend/src/config/configuration.ts +++ b/backend/src/config/configuration.ts @@ -1,10 +1,11 @@ + export default () => ({ - port: parseInt(process.env.BLOG_PORT, 10) || 3000, + port: parseInt(process.env.BLOG_PORT!, 10) || 3000, database: { host: process.env.POSTGRES_HOST, - port: parseInt(process.env.POSTGRES_PORT, 10) || 5432, + port: parseInt(process.env.POSTGRES_PORT!, 10) || 5432, name: process.env.BLOG_DB_NAME, user: process.env.BLOG_DB_USER, - password: process.env.BLOG_DB_PASSWORD, - }, + password: process.env.BLOG_DB_PASSWORD + } }); diff --git a/backend/src/database/database.module.ts b/backend/src/database/database.module.ts index aa0e51c..fee3089 100644 --- a/backend/src/database/database.module.ts +++ b/backend/src/database/database.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { ConfigModule, ConfigService } from '@nestjs/config'; -import configuration from './config/configuration'; +import configuration from '../config/configuration'; @Module({ imports: [ diff --git a/backend/src/main.ts b/backend/src/main.ts index be7d74e..e139c49 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -7,4 +7,4 @@ async function bootstrap() { await app.listen(process.env.PORT ?? 3000); } -await bootstrap(); +bootstrap();