with Neon Postgres and Dreamhost?
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
},
})
The Dreamhost API enables you to automate tasks related to your hosting account. This includes managing domains, DNS records, and email accounts, as well as accessing usage stats and billing information. With Pipedream, you can create serverless workflows that leverage the Dreamhost API to integrate with other services, respond to events, and automate your web hosting operations, all without managing infrastructure.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
dreamhost: {
type: "app",
app: "dreamhost",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.dreamhost.com/?key=${auths.dreamhost.api_key}&cmd=dns-list_records`,
})
},
})