Home / Companies / Neon / Blog / Post Details
Content Deep Dive

Build a serverless API using Cloudflare Workers, Drizzle ORM, and Neon

Blog post from Neon

Post Details
Company
Date Published
Author
Mahmoud Abdelwahab
Word Count
1,556
Language
English
Hacker News Points
-
Summary

You can build a serverless API using Cloudflare Workers, Drizzle ORM, and Neon by following this guide. You'll start by setting up a new project with create-cloudflare-cli, which will generate the initial code for your worker. Next, you'll add Hono.js to handle different HTTP methods, and then set up a Neon Postgres instance that can automatically scale based on demand. Drizzle ORM is used to define the database schema in TypeScript, and you'll generate database migrations using the `drizzle-orm` package. You'll also connect to the database from your worker and deploy it using wrangler. Finally, you'll use the Neon integration on Cloudflare to simplify credential management and redeploy your worker automatically.