Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
@clickhouse/client-web
Advanced tools
Official JS client for ClickHouse, written purely in TypeScript, thoroughly tested with actual ClickHouse versions.
The repository consists of three packages:
@clickhouse/client
- a version of the client designed for Node.js platform only. It is built on top of HTTP
and Stream APIs; supports streaming for both selects and inserts.@clickhouse/client-web
- a version of the client built on top of Fetch
and Web Streams APIs; supports streaming for selects.
Compatible with Chrome/Firefox browsers and CloudFlare workers.@clickhouse/client-common
- shared common types and the base framework for building a custom client implementation.See the ClickHouse website for the full documentation entry.
We have a wide range of examples, aiming to cover various scenarios of client usage. The overview is available in the examples README.
If you have any questions or need help, feel free to reach out to us in the Community Slack (#clickhouse-js
channel) or via GitHub issues.
Check out our contributing guide.
1.2.0 (Node.js)
(Experimental) Added an option to provide a custom HTTP Agent in the client configuration via the http_agent
option (#283, related: #278). The following conditions apply if a custom HTTP Agent is provided:
max_open_connections
and tls
options will have no effect and will be ignored by the client, as it is a part of the underlying HTTP Agent configuration.keep_alive.enabled
will only regulate the default value of the Connection
header (true
-> Connection: keep-alive
, false
-> Connection: close
).keep_alive.idle_socket_ttl
value to 0
.(Experimental) Added a new client configuration option: set_basic_auth_header
, which disables the Authorization
header that is set by the client by default for every outgoing HTTP request. One of the possible scenarios when it is necessary to disable this header is when a custom HTTPS agent is used, and the server requires TLS authorization. For example:
const agent = new https.Agent({
ca: fs.readFileSync('./ca.crt'),
})
const client = createClient({
url: 'https://server.clickhouseconnect.test:8443',
http_agent: agent,
// With a custom HTTPS agent, the client won't use the default HTTPS connection implementation; the headers should be provided manually
http_headers: {
'X-ClickHouse-User': 'default',
'X-ClickHouse-Key': '',
},
// Authorization header conflicts with the TLS headers; disable it.
set_basic_auth_header: false,
})
NB: It is currently not possible to set the set_basic_auth_header
option via the URL params.
If you have feedback on these experimental features, please let us know by creating an issue in the repository.
FAQs
Official JS client for ClickHouse DB - Web API implementation
The npm package @clickhouse/client-web receives a total of 6,145 weekly downloads. As such, @clickhouse/client-web popularity was classified as popular.
We found that @clickhouse/client-web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.