Skip to content

Commit

Permalink
feat: Add dotenv configuration for Swagger generation
Browse files Browse the repository at this point in the history
- Import and configure dotenv to load environment variables
- Ensure SERVER_PORT and SERVER_URL can be dynamically set via .env file
  • Loading branch information
tercel committed Feb 11, 2025
1 parent 29a9f5f commit f0a4358
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/client-direct/swagger.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import swaggerAutogen from 'swagger-autogen';
import dotenv from 'dotenv';

dotenv.config();

const port = process.env.SERVER_PORT ?? 3000;
const srvUrl = process.env.SERVER_URL ?? 'http://localhost:' + port;
Expand Down

0 comments on commit f0a4358

Please sign in to comment.