1.0.3 • Published 4 months ago

fastify-clickhouse v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Fastify ClickHouse

A Fastify plugin that simplifies access to the ClickHouse client.

Code rewritten from Fastify Prisma plugin to instead use the ClickHouse client.

Installation

NPM

npm i fastify-clickhouse

Yarn

yarn add fastify-clickhouse

Usage

You can register it with the clickhouse client config

import fastifyClickHouse from 'fastify-clickhouse';
await server.register(fastifyClickHouse, {
    clientConfig: {
        url: 'localhost:8123',
        username: "USERNAME",
        password: "PASSWORD"
    }
});

Or pass a ClickHouse client instance

import { createClient } from '@clickhouse/client';

const clickhouse = await createClient({
    url: 'localhost:8123',
    username: "USERNAME",
    password: "PASSWORD"
});

server.register(fastifyClickHouse, clickhouse);
1.0.3

4 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago