TimonKK / clickhouse

NodeJS client for ClickHouse
Apache License 2.0
221 stars 122 forks source link

Port is missing in the URL if the port number is custom #59

Closed raj-298585 closed 3 years ago

raj-298585 commented 3 years ago

Port number is missing in the URL if it's custom port number for HTTPS. Below is an URL generated for the following configuration: "https://<USERNAME>:<PWD>@my.domain.com/?user=default&session_timeout=60&output_format_json_quote_64bit_integers=0&enable_http_compression=0&ssl=true&database=traffic&query_id=2ac8e527-bf77-4cc1-991c-cb3ce959adff&query=SELECT+1+FORMAT+JSON%3B"

Below is the sample config:

{
  url: 'https://my.domain.com:8123',
  port: 8123,
  debug: false,
  basicAuth: {
    username:
      'USER_NAME',
    password:
      'PWD',
  },
  isUseGzip: false,
  format: 'json', // "json" || "csv" || "tsv"
  config: {
    ssl: true,
    database: 'traffic',
  },
}
TimonKK commented 3 years ago

Thanks for your example

TimonKK commented 3 years ago

Which priority do you think more expected:

TimonKK commented 3 years ago

I publish new version clickhouse@2.2.1. Please update package and try