
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@planetscale/edge
Advanced tools
A JavaScript client for communicating with PlanetScale Edge API.
A JavaScript client for the PlanetScale Edge API.
$ npm install @planetscale/edge
import { connect } from '@planetscale/edge'
const config = {
host: 'aws.connect.psdb.cloud',
username: '<user>',
password: '<password>'
}
const conn = await connect(config)
const results = await conn.execute('select 1 from dual')
console.log(results)
Use the Client
connection factory class to create fresh connections for each transaction or web request handler.
import { Client } from '@planetscale/edge'
const client = new Client({
host: 'aws.connect.psdb.cloud',
username: '<user>',
password: '<password>'
})
const conn = await client.connection()
const results = await conn.execute('select 1 from dual')
console.log(results)
Node.js version 18 includes a built-in global fetch
function. When using an older version of Node.js, you can provide a custom fetch function implementation. We recommend the undici
package on which Node's built-in fetch is based.
import { connect } from '@planetscale/edge'
import { fetch } from 'undici'
const config = {
fetch,
host: 'aws.connect.psdb.cloud',
username: '<user>',
password: '<password>'
}
const conn = await connect(config)
const results = await conn.execute('select 1 from dual')
console.log(results)
npm install
npm test
Distributed under the Apache 2.0 license. See LICENSE for details.
FAQs
A JavaScript client for communicating with PlanetScale Edge API.
The npm package @planetscale/edge receives a total of 0 weekly downloads. As such, @planetscale/edge popularity was classified as not popular.
We found that @planetscale/edge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.