3 ms·
Based on this code example: import { sql } from '@vercel/postgres'; const { rows } = await sql` INSERT INTO products (name) VALUES (${
by simonw 4y ago
Based on this code example:
import { sql } from '@vercel/postgres';
const { rows } = await sql`
INSERT INTO products (name)
VALUES (${formData.get('name')})
`;
Presumably authentication is handled transparently? I really like that - reminds me of Deno's new KV cloud stuff too.
Is that done with environment variables? I'd want a way to tap into that from Python code as well.
- cramforce 4y agoYeah, if you go into the dashboard it gives you a bunch of options for connecting to the DB including the names of the automatically generated environment variables. And that includes POSTGRES_URL which most tools default to.