Skip to content

Commit

Permalink
feat: fix Clickhouse configuration to use default port if not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
simlarsen committed Jan 6, 2025
1 parent 2e3ed42 commit a7ad9b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Common/Server/Infrastructure/ClickhouseConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ export type ClickHouseClientConfigOptions = NodeClickHouseClientConfigOptions;
const hostProtocol: string = ClickHouseIsHostHttps ? "https" : "http";

const clickhouseHost: Hostname = ClickhouseHost || new Hostname("clickhouse");
const clickhousePort: string = (ClickhousePort || 8123).toString();

const options: ClickHouseClientConfigOptions = {
url: `${hostProtocol}://${clickhouseHost.toString()}:${ClickhousePort.toNumber()}`,
url: `${hostProtocol}://${clickhouseHost.toString()}:${clickhousePort}`,
username: ClickhouseUsername,
password: ClickhousePassword,
database: ClickhouseDatabase,
Expand Down

0 comments on commit a7ad9b7

Please sign in to comment.