WindmillWWindmill
Powered by
SindreS
Windmill•3y ago•
1 reply
Sindre

postgres with tls

I do this @ravioli
import * as wmill from "https://deno.land/x/windmill@v1.100.2/mod.ts";

export async function main(
  dbConfig: wmill.Resource<"postgresql">,
) {
  const caCert = await wmill.getVariable("f/invoicing/CA_CERT");
  dbConfig.tls.caCertificates = [caCert];

  const client = new Client(dbConfig);
  await client.connect();

  const res = await client.queryObject(
    `select * from youcandothis`,
  );

  await client.end();

  return res.rows;
}
import * as wmill from "https://deno.land/x/windmill@v1.100.2/mod.ts";

export async function main(
  dbConfig: wmill.Resource<"postgresql">,
) {
  const caCert = await wmill.getVariable("f/invoicing/CA_CERT");
  dbConfig.tls.caCertificates = [caCert];

  const client = new Client(dbConfig);
  await client.connect();

  const res = await client.queryObject(
    `select * from youcandothis`,
  );

  await client.end();

  return res.rows;
}
WindmillJoin
3,362Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c · 5d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra · 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 🙂

henri-c · 4w ago

Similar Threads

Scaling: beyond postgres 5k rps
rubenfRrubenf / general
2y ago
Hi, im trying to create a postgres
matiasbpg_25163Mmatiasbpg_25163 / general
2y ago
Is there anyone with experience with
rubenfRrubenf / general
3y ago