Skip to content

Commit

Permalink
Merge pull request #32 from jembi/clickhouse-password
Browse files Browse the repository at this point in the history
Add ability to set clickhouse password
  • Loading branch information
rcrichton authored Sep 13, 2024
2 parents 2f2c6ce + a9777eb commit c2213d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/kafka-mapper-consumer/src/clickhouse/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ import {Table} from '../../src/types'

const CLICKHOUSE_HOST = process.env.CLICKHOUSE_HOST ?? 'localhost'
const CLICKHOUSE_PORT = parseInt(process.env.CLICKHOUSE_PORT ?? '8124')
const CLICKHOUSE_PASSWORD = process.env.CLICKHOUSE_PASSWORD ?? ''

const clickhouse = new ClickHouse({
url: CLICKHOUSE_HOST,
port: CLICKHOUSE_PORT,
debug: true
debug: true,
basicAuth: {
username: 'default',
password: CLICKHOUSE_PASSWORD
}
})

const selectQuery = (table: Table) =>
Expand Down

0 comments on commit c2213d6

Please sign in to comment.