Serverless API with Cloudflare Workers (Hono, D1 and Drizzle ORM)

HomeOther Content, TechServerless API with Cloudflare Workers (Hono, D1 and Drizzle ORM)
Serverless API with Cloudflare Workers (Hono, D1 and Drizzle ORM)
Serverless API with Cloudflare Workers (Hono, D1 and Drizzle ORM)
Cloudflare Workers – a hot topic lately, but the one thing few videos cover is how to query a serverless database. In this video we set up a Cloudflare D1 database and query it using Drizzle ORM. The REST API is built using Hono for routing and we have Bun as our package manager. Let me know if there are any other Cloudflare tools you're interested in!

#cloudflare #bunjs #hono #drizzleorm

Connections
Project code: https://github.com/cdbrw/cfw-bun-hono-drizzle/tree/feat/routing-and-drizzle-orm
Configure Drizzle ORM: https://youtu.be/Eljdg5_EgOI
Deploy a Bun application: https://youtu.be/fZyAx97hzfw

Personal connections
Blog: https://blog.thecodebrew.tech
GitHub: https://github.com/cdbrw
Twitter: https://twitter.com/cdbrw

Support the channel
BuyMeACoffee: https://www.buymeacoffee.com/codebrew

00:00 Presentation
01:21 Setup
03:27 First deployment
04:15 Dependencies
04:42 Create a database
05:16 Environment variables
07:20 Installation of drizzle
08:25 Querying the database
09:22 Local migrations
10:07 Connecting to local database
10:33 Production migrations
11:28 More routes
12:23 API testing

Please take the opportunity to connect and share this video with your friends and family if you find it useful.

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *