diff --git a/deno-client/mod.ts b/deno-client/mod.ts index 78180d35ae..29de3ba6ba 100644 --- a/deno-client/mod.ts +++ b/deno-client/mod.ts @@ -123,3 +123,8 @@ async function _transformLeaf(v: any): Promise { return v } } + +export async function databaseUrlFromResource(path: string): Promise { + const resource = await getResource(path) + return `postgresql://${resource.user}:${resource.password}@${resource.host}:${resource.port}/${resource.database}?sslmode=${resource.sslmode}` +}