Create instant MySql gratification with a light, types safe ORM offering time saving tools. Pain-pleasure principle am I right?
Or
npx create-next-app https://github.com/lnxAv/next-drizzle-mysql
1. In your browser, go to your deployment settings > Environment Variables
2. Fill the following variable accordingly
( Note: You can separate production & development env's for security purpose )
DATABASE_USER, DATABASE_PASSWORD, DATABASE_HOST, DATABASE_PORT, DATABASE_SCHEMA3. In your project terminal type
Vercel env pull( Note: You can also type "vercel env ls" to list them )
1. In your project root add a `.env.local` file
2. Copy paste and fill accordingly
# Development variables DATABASE_USER="root" DATABASE_PASSWORD="admin" DATABASE_SCHEMA="database" DATABASE_HOST="localhost" DATABASE_PORT="3306"
1. Push the example tables in your new database with
npx drizzle-kit push:mysql2. Populate your database with the magic button
3. Read the documentation below and enjoy :)
1. Pull your database DDL with
npm run pull-db2. Copy/Paste the content From => To
database/drizzle/schema.ts => database/db_tables.ts2. Get your data by modifying the example in
app/api/route.ts4. If needed, modify the "magicAction" to populate your database.
5. Read the documentation below and enjoy :)
For unfamilliar users, you can easily deploy your own database,
Grab a coffee and learn the basics in 17 minutes.
MySQL - The Basics // Learn SQL in 23 Easy Step
npm run | Description |
---|---|
dev | Launch the project in development mode |
build | Build the project, great to see package size |
start | Launch the built project |
prettier | Clean files according to .prettierrrc.json |
lint | Verify files according to .eslintrc.json |
Migrate | Run the migrations with Drizzle |
drop | Lets you delete previously generated migrations from migrations folder |
pull-db | Lets you pull DDL from existing database and generate a schema.ts |
push-db | Lets you push your schema changes directly to the database |
studio-db | Drizzle Studio is a new way for you to explore SQL database on Drizzle projects. |
Categories | Links |
---|---|
Cores | Next.js, Vercel, Drizzle ORM |
Traductions | next-international |
Providers | Next-Themes |
Fetcher | SWR.js |
Animation | Motion.dev |
Dev Dependencies | husky, dotenv, drizzle-kit |
Total: 50kb |