惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Jina AI
Jina AI
月光博客
月光博客
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
T
Tailwind CSS Blog
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
大猫的无限游戏
大猫的无限游戏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
阮一峰的网络日志
阮一峰的网络日志
量子位
博客园 - 【当耐特】
The Cloudflare Blog
宝玉的分享
宝玉的分享
博客园 - 聂微东
博客园 - 叶小钗
美团技术团队
G
Google Developers Blog
人人都是产品经理
人人都是产品经理
博客园 - Franky
小众软件
小众软件

Deno

Deno 2.8 | Deno Claw Patrol: an open-source security firewall for agents | Deno Fresh 2.3: Zero JS by default, View Transitions, and Temporal support | Deno Deno 2.7: Temporal API, Windows ARM, and npm overrides | Deno Build a dinosaur runner game with Deno, pt. 6 | Deno Build a dinosaur runner game with Deno, pt. 5 | Deno Deno Deploy is Generally Available | Deno Introducing Deno Sandbox | Deno Build a dinosaur runner game with Deno, pt. 4 | Deno Build a dinosaur runner game with Deno, pt. 3 | Deno Build a dinosaur runner game with Deno, pt. 2 | Deno React / Next.js Denial-of-Service Vulnerability: Deno Deploy users protected | Deno Deno 2.6: dx is the new npx | Deno Build a dinosaur runner game with Deno, pt. 1 | Deno React Server Functions / Next.js Vulnerability: Deno Deploy users protected | Deno My highlights from the new Deno Deploy | Deno Deno's Other Open Source Projects | Deno How Deno protects against npm exploits | Deno Help Us Raise $200k to Free JavaScript from Oracle | Deno Deno 2.5: Permissions in the config file | Deno Fresh 2.0 Graduates to Beta, Adds Vite Support | Deno Deno 2.4: deno bundle is back | Deno JavaScript™ Trademark Update | Deno What's coming to JavaScript | Deno A brief history of JavaScript | Deno Reports of Deno's Demise Have Been Greatly Exaggerated | Deno An Update on Fresh | Deno How Plaid migrated 100 services to a new database platform 5x faster with Deno | Deno Deno 2.3: Improved deno compile, local npm packages, and more | Deno Add JSR packages with pnpm and Yarn | Deno
Announcing the Neon Serverless Driver on JSR | Deno
Andy Jiang · 2024-04-18 · via Deno

JSR is a modern JavaScript registry intended to simplify publishing and consuming JavaScript and TypeScript modules, while also moving the ecosystem forward by supporting and promoting web standards. Since our launch, over 7.5k users have signed up to JSR.

Today, we’re thrilled to announce that the Neon Serverless Driver is now available on JSR.

Neon is a fully managed, serverless, scalable Postgres driver that simplifies adding a persistent relational database to your projects.

Using Neon via JSR not only offers a better developer experience than npm, but also provides faster query latencies. This serverless driver allows V8 isolate runtimes like Deno and Cloudflare Workers to connect to the database via protocols other than TCP, which minimizes the number of required round trips and allows for sub-10ms first query latencies.

Read on for more information on how to install and use Neon with JSR.

Installing the Neon serverless driver

You can get started with the Neon serverless driver using the deno add command:

deno add @neon/serverless

Or using npm:

npx jsr add @neon/serverless

The above command will generate a deno.json file, listing all your project dependencies:

{
  "imports": {
    "@neon/serverless": "jsr:@neon/serverless^0.9.2"
  }
}

You can then import the serverless driver to your main.ts file:

import { neon } from "@neon/serverless";


const databaseUrl = Deno.env.get("DATABASE_URL")!;

const sql = neon(databaseUrl);
const result = await sql`SELECT 'Hello World' as message`;

Finally, you can run the following command to execute:

What’s next?

With Neon’s serverless driver on JSR, you can quickly add Postgres to your project and achieve sub-10ms queries, regardless of which JavaScript runtime you’re using.

🚨️ Read more about JSR 🚨️