Skip to content

Hono ve Prisma ile D1

  • Hono framework ile D1 entegrasyonu
  • Prisma ORM kullanımı
  • Type-safe sorgular
import { Hono } from 'hono';
const app = new Hono<{ Bindings: Env }>();
app.get('/users', async (c) => {
const { results } = await c.env.DB.prepare('SELECT * FROM users').run();
return c.json(results);
});
import { PrismaClient } from '@prisma/client';
import { PrismaD1 } from '@prisma/adapter-d1';
const prisma = new PrismaClient({
adapter: new PrismaD1(),
});
const users = await prisma.user.findMany();

✅ Hono integration ✅ Prisma ORM

Diğer Frameworkler - Remix, SvelteKit.


Ders Süresi: 75 dakika Zorluk Seviyesi: İleri