Drizzle
How To Start
- 설치
pnpm add drizzle-orm mysql2
pnpm add drizzle-orm @planetscale/database
pnpm add -D drizzle-kit
- 클라이언트 연결
import { drizzle } from "drizzle-orm/mysql2";
import mysql from "mysql2/promise";
const connection = await mysql.createConnection({
host: "host",
user: "user",
database: "database",
...
});
const db = drizzle(connection);