Skip to main content

How do I use NodeJS with @clickhouse/client

Learn how to use @clickhouse/client in a Node.js application to interact with ClickHouse and perform queries.

Use NodeJS with @clickhouse/client

Here is a basic code snippet file main.ts.

Package.json (place it under ./):

Main.ts (place it under ./src):

To install the packages, run yarn from ./:

execute the code in main.ts from ./ with:

will output:

· 2 min read