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,388Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

We're live here https://discord.com/channels/930051556043276338/1278977038430240813

henri-c · 6d ago

rubenf

Infrastructure as code

rubenf · 4w ago

rubenf

As we're preparing for a new Windmill sandbox SDK, we took the opportunity **to open-source NSJAIL sandboxing** and make it available in CE and easier to set. In 1.634.0, just set nsjail to benefit from the tightest security and isolation per job. It's constraining so no need to use it unless you need but now you won't be restricted in security for CE if you need to.

rubenf · 4w ago

Similar Threads

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