Skip to content

Commit

Permalink
Merge pull request #13 from adidoesnt/development
Browse files Browse the repository at this point in the history
fix api client base url for prod
  • Loading branch information
wish2023 authored Feb 6, 2024
2 parents c39ed39 + ecfe70e commit 4bd3c2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion telegram-bot/src/components/apiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { type Logger as Log4js } from 'log4js';
import { Logger } from 'components/logger';

const {
NODE_ENV: env = 'DEV',
BACKEND_HOST: host = '127.0.0.1',
BACKEND_PORT: port = 8080,
API_CLIENT_TIMEOUT: timeout = 10000,
Expand All @@ -15,7 +16,7 @@ export class ApiClient {
private logger: Log4js;

static getBaseUrl() {
return `http://${host}:${port}`;
return env === 'DEV' ? `http://${host}:${port}` : `https://${host}`;
}

private constructor() {
Expand Down

0 comments on commit 4bd3c2b

Please sign in to comment.