Skip to content

Comment on The PlanetScale serverless driver for JavaScript

Comments

Please forgive my ignorance. Is it right if I say the password seems to be available on the client side?

import { connect } from '@planetscale/database'

const config = { host: '<host>', username: '<user>', password: '<password>' }

https://github.com/planetscale/database-js

They say in the post to use environment variables when deploying. I think they’re talking about server-side JS, not JS running in an end-user’s browser.

The intended runtime platform is serverless/edge compute, not client side. Think Cloudflare Workers, Vercel Edge Functions, AWS Lambda, etc.

The idea is these runtimes typically only allow HTTP outbound requests, not whatever protocol is typically used to connect to a planetscale db.

Correct. I would not recommend doing that. This is analogous to a database driver. It's raw access to the database.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.