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

推荐订阅源

D
Docker
月光博客
月光博客
B
Blog RSS Feed
C
Check Point Blog
WordPress大学
WordPress大学
T
Tailwind CSS Blog
GbyAI
GbyAI
H
Help Net Security
Y
Y Combinator Blog
I
InfoQ
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
美团技术团队
博客园 - 三生石上(FineUI控件)
MongoDB | Blog
MongoDB | Blog
Jina AI
Jina AI
A
About on SuperTechFans
G
Google Developers Blog
爱范儿
爱范儿
F
Fortinet All Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
人人都是产品经理
人人都是产品经理

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 🚨️