Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap
Build a random quote machine with Nextjs, PlanetScale MySQL, & Drizzle ORM. In this tutorial, we'll set up a MySQL database on PlanetScale, connect to and query the database with Drizzle ORM, and build a Next.js frontend and API routes.
⭐ Become a full-stack web dev with Zero To Mastery Courses:
- Complete Next.js Developer: https://bit.ly/CompNextJSDev
- Advanced React: https://bit.ly/AdvReactDev
- Junior to Senior Dev Roadmap: https://bit.ly/WebDevRoadmap-JrtoSr
Subscribe https://bit.ly/3nGHmNn
Course Updates https://courses.davegray.codes/
Questions - Please post them to my Discord https://discord.gg/neKghyefqh
Buy Me A Coffee https://www.buymeacoffee.com/davegray
Follow Me On Social Media:
Github: https://github.com/gitdagray
Twitter: https://twitter.com/yesdavidgray
LinkedIn: https://www.linkedin.com/in/davidagray/
Source Code: https://github.com/gitdagray/nextjs-mysql-drizzle
Build a Random Quote Machine with Nextjs, PlanetScale MySQL, & Drizzle ORM
(00:00) Intro
(00:18) Welcome
(00:42) PlanetScale
(01:34) Create a MySQL database
(02:47) Create & populate the tables
(10:29) Promote the branch to production
(11:07) Get connection credentials
(12:54) Creating the Next.js project
(15:16) Getting started with Drizzle
(21:19) Introspect for automatic schema generation
(25:54) Create library functions to retrieve the data
(37:54) Next.js API Routes
(41:50) Next.js Random Quote Machine
Tutorial References:
SQL Crash Course video: https://youtu.be/WFNtmhwU5HU
PlanetScale SQL Course: https://planetscale.com/courses/mysql-for-developers/introduction/course-introduction
Next.js Official Site: https://nextjs.org/
PlanetScale Official Site: https://planetscale.com/
Drizzle ORM Official Site: https://orm.drizzle.team/
ES7 React Snippets Extension: https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets
Multiple Cursor Case Preserve Extension: https://marketplace.visualstudio.com/items?itemName=Cardinal90.multi-cursor-case-preserve
Was this Next.js tutorial using PlanetScale MySQL and Drizzle ORM helpful? If so, please share. Let me know your thoughts in the comments.
#nextjs #mysql #drizzle