import { axios } from "@pipedream/platform";
import { neon } from "@neondatabase/serverless";
export default defineComponent({
props: {
neon_postgres: {
type: "app",
app: "neon_postgres",
}
},
async run({ steps, $ }) {
const { host, port, user, password, database } = this.neon_postgres.$auth
const connectionString = `postgresql://${user}:${password}@${host}:${port}/${database}`
const sql = neon(connectionString)
const result = await sql`SELECT version()`
const { version } = result[0]
return version
},
})
Neon Postgres uses API keys for authentication. When you connect your Neon Postgres account, Pipedream securely stores the keys so you can easily authenticate to Neon Postgres APIs in both code and no-code steps.