From 62f33f03cd274c93452bee4c69487181bd258df5 Mon Sep 17 00:00:00 2001 From: Avraham Sakal Date: Sun, 2 Feb 2025 17:41:45 -0500 Subject: [PATCH] add `CLICKHOUSE_URL` env var --- clickhouse.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/clickhouse.ts b/clickhouse.ts index bbfd30e..806c59a 100644 --- a/clickhouse.ts +++ b/clickhouse.ts @@ -5,10 +5,12 @@ import { Env } from "@humanwhocodes/env"; dotenv.config(); const env = new Env(); +const CLICKHOUSE_URL = env.require("CLICKHOUSE_URL"); const CLICKHOUSE_USERNAME = env.require("CLICKHOUSE_USERNAME"); const CLICKHOUSE_PASSWORD = env.require("CLICKHOUSE_PASSWORD"); export const client = createClient({ + url: CLICKHOUSE_URL, username: CLICKHOUSE_USERNAME, password: CLICKHOUSE_PASSWORD, clickhouse_settings: { @@ -19,7 +21,7 @@ export const client = createClient({ }, }); -client.insert({ - table: "option_quotes", - values: [], -}); +// client.insert({ +// table: "option_quotes", +// values: [], +// });