Skip to content

Commit

Permalink
Updating swagger config
Browse files Browse the repository at this point in the history
  • Loading branch information
kadraman committed May 3, 2024
1 parent 59182e3 commit fd6a3df
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/configs/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ class AppConfig {
private dbHost: string = config.get('App.dbConfig.host') || 'localhost';
private dbPort: number = config.get('App.dbConfig.port') || 27017;
private dbName: string = config.get('App.dbConfig.database') || 'iwa';
public mongoUrl: string = `mongodb://${this.dbHost}:${this.dbPort}/${this.dbName}?authSource=admin`;
private dbUser: string = config.get('App.dbConfig.user') || 'iwa';
private dbPassword: string = config.get('App.dbConfig.password') || 'iwa';
public mongoUrl: string = `mongodb://${this.dbUser}:${this.dbPassword}@${this.dbHost}:${this.dbPort}/${this.dbName}?authSource=admin`;

constructor() {
this.app = express();
Expand Down
4 changes: 4 additions & 0 deletions src/configs/swagger.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ const doc = {
},
],
servers: [
{
url: "https://iwa-api.onfortify.com",
description: "Production server"
},
{
url: `${apiUrl}`,
description: `${apiDesc}`
Expand Down
4 changes: 4 additions & 0 deletions src/configs/swagger_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
}
},
"servers": [
{
"url": "https://iwa-api.onfortify.com",
"description": "Production server"
},
{
"url": "http://localhost:3000",
"description": "Development server"
Expand Down

0 comments on commit fd6a3df

Please sign in to comment.