Serverless Databases With PlanetScale and Next.js
Custom databases on the Jamstack? Absolutely! Taylor Barnett will teach us how Planetscale and Netlify make it possible (and fun!) to build and deploy DB-powered Next.js apps!
Links & Resources
- https://planetscale.com/
- https://www.prisma.io/
- https://github.com/planetscale/cli
- https://www.rustadventure.dev/
- https://twitter.com/planetscaledata
- https://www.netlify.com/blog/2021/11/15/deploy-a-dynamic-next.js-app-to-netlify-with-planetscales-branchable-serverless-database/
- https://github.com/planetscale/nextjs-planetscale-starter
- https://github.com/planetscale/nextjs-conf-2021
Full Transcript
Click to toggle the visibility of the transcript
Captions provided by White Coat Captioning (https://whitecoatcaptioning.com/). Communication Access Realtime Translation (CART) is provided in order to facilitate communication accessibility and may not be a totally verbatim record of the proceedings.
JASON LENGSTORF: Hello, everyone. And, welcome to another episode of Learn With Jason. Today, on the show, we have Taylor Barnett. Taylor, how are you doing?
TAYLOR BARNETT: I'm doing good.
JASON LENGSTORF: Do you want to give us the highlights of everything you've done this week?
TAYLOR BARNETT: Monday, we released a new Next.js app that can be deployed to Netlify by the oneclick and a few extra database set up steps.
Tuesday, we announced that PlanetScale's out of beta, we're now GA. And that we also raised a series C round.
Wednesday, we announced data imports which I feel is probably one of our most technicallyawesome features, but is slightly overshadows a tad. You can import your data from any MySQL database. Say new rights happen to the old database, until you turn over and connect to PlanetScale, PlanetScale brings all those new rights in. You can read the data. Changing database is, like, a scary thing. That sounds like downtime. But it's done in a way that it would be no downtime, no day loss, no nothing. So that's really cool.
And then, Thursday day, you can now create a PlanetScale database inside the new Prisma database platform and query it and explore the data and different stuff at cloud.prisma.io.
And then, today, here, but also, we announced our type, it's MySQL GUI. If you've ever used a MySQL GUI, sometimes you feel like you're in 1995. This does not look that way and it supports branching so you can use your PlanetScale branches in there, which has historically been hard because you have to create a new branch every time. If you're using a local SQL GUI, this one supports it. It has an awesome design. We're big fans of. No big deal.
[Laughter].
JASON LENGSTORF: While you were launching all of that, you were showing up at events. You hired two new teammates.
TAYLOR BARNETT: And I was on vacation, last week, partially, too.
JASON LENGSTORF: I imagine you got� maybe got a nap planned for.
TAYLOR BARNETT: Yeah, yeah. Definitely a nap and I'm really excited for a long Thanksgiving weekend next week.
JASON LENGSTORF: Me, too. A coworker of mine� a friend and coworker, Lauren, sent me a pecan pie from Texas and I'm planning on eating the whole thing.
TAYLOR BARNETT: Tuesday I'm going to make a chocolate caramel pecan pie. It takes less than an hour so any pie that takes less than an hour, sign me up. Partially because you don't have to do any dough because the crust is pecans and it's melted caramel and a chocolate layer on the top. It's basically a candy bar.
JASON LENGSTORF: I would like that recipe.
TAYLOR BARNETT: I need to find it and text my mom and remind me where I store that recipe. [Laughter].
JASON LENGSTORF: I know that what� I know you probably mean something different. I picture her on the phone with you going, okay, remember that one cupboard in your kitchen? Go to the back, open it up. [Laughter].
TAYLOR BARNETT: It's her looking up in her proper recipe book and taking a picture and sending it over. Which I have to do every 12 months because I don't, like, store recipes.
JASON LENGSTORF: I get it. I have� I feel like ever dev who cooks has this� this backofthehead ambition, I'm going to build that recipe app and keep my recipes in that. I can't even be bothered to put my recipe folders.
TAYLOR BARNETT: That is one of the projects I think I did in college. Like, I was in a software engineering course, I think my senior year, and we had to create an API and we came up with a food API or something.
JASON LENGSTORF: I love it.
TAYLOR BARNETT: Yeah. That's what we did. It definitely� I think I still have the repo from it, that's, like, six years ago. [Laughter]. But, yeah, maybe I should pull that back up. It was written in Python.
JASON LENGSTORF: We need that pecan pie recipe.
For folks who are not familiar with your work, baking and otherwise�
[Laughter].
� do you want to give us background on yourself?
TAYLOR BARNETT: So, I've been doing developer relations for about 67 years now. I was doing a little bit of full stack development. I studied computer science at University of Texas. This was the first phase of university hackathons. Cassidy, we were in the same time of growing up in these hackathons. I realized I didn't want to write code all day, every day. I still love writing code. But I saw it as a tool to something bigger. I saw it as a tool to connect with people, to relate to help people, rather than just, like, write web apps for, you know, one of the startups I worked at was commercial real estate startup. This was not my cup of tea. So, I joined a startup called [Indiscernible] that was really big a few years ago. I left when I got [Indiscernible] hired. I did DevRel there. When it was really starting to take off, had a great team there, that I really got to learn how awesome that kind of work can be and all the different possibilities that you could do with it and was sold. I did have one point where I remember where I did take software engineering interviews because I was debating going back.
Data analytics API. Then I went to an API tooling company to help developers actually build their APIs, like, doing the design and the documentation, the testing of it. Then I went to a more general, like, API, um, not management as much as, like, integration platform. Where I was doing more� it was kind of start of me going into the serverless world [audio cutting out] on the platform and it was delivered in kind of a serverless kind of lay with a few layers on top of it to help people integrate APIs together and their data.
And then, now I'm at PlanetScale, since the end of July. So, I've� my world has been APIs and data. But maybe not necessarily databases. So, back when I was doing software engineering, that was, like, the part that I, like, did not want to touch the most. Because it was scary. You know?
JASON LENGSTORF: You just touched on something� especially for folks who are frontendspecialized. When you start bringing up databases, they can feel very intimidating. One of the things you hear as the core problem, every time there's a security problem, oh, the database got breached or data loss, somebody accidentally deleted the entire database. It always feels like when there's a big problem that really gets a company into a lot of trouble, it's the database. Something happened to the database.
It might be somebody got to the database, but it doesn't make me less nervous about getting into data.
So, what caused you to make that jump? What caused you to jump in with databases?
TAYLOR BARNETT: Yeah. I mean, this was around when PlanetScale had just come out of beta, back in May. I had some friends that had been working there and it� it just was so easy to get started. Like, creating the database took just seconds when if you've ever opened up, like, an AWS console, you have to make decisions about sizing of stuff and, like, all these different decisions and you're like, well, what happens if I want to change my mind? Will I be able to, like, scale? Is this� if I don't make the right decision, right now, is that going to cause technical debt down in the road, in a year, that's going to cause a month of my life again? I have no idea.
And so I was just� I was always historically just scared to touch just databases, in general. I wasn't scared of data. I was working on a company that had a really nice API and it was event data and it was flexible schemas, when people are starting to go into no SQL and stuff. That felt more welcoming and it felt more like I can make changes. You should spend on the data. I could make changes and stuff like that.
And so, you know, this idea that a database� that databases have been ignored for so long, like the developer experience of them. You know, we push them off to other database experts and it's some sort of black magic that no one else knows. We, as software developers and engineers, we're having to consult them or being scared when we had to do a migration or we need to add a column to a table, that can be scary. What's going to happen? We've seen those statuspages where some service was unavailable from 9:00 a.m. to 12:00. It doesn't� it started making me think it doesn't have to be that way. It's basically the� the largest collection of, like, modern tooling around MySQL you could find at any company is at PlanetScale. I was like, well, if they can't figure it out, then we're really screwed.
[Laughter].
So, yeah, just that strong developer experience focus was something that really spoke to me and it's been something I've cared about for years, whether that was small projects I was working on, like documentation or tutorials, getting started experiences.
And I felt like I could actually have, like, a lot of impact and make developers' lives better in this thing that is not great for many of them now.
JASON LENGSTORF: It definitely feels to me like there's a bit of a renaissance in the database space. There have always been database players and as we've seen the Jamstack approach to websites take off, where frontends are decoupled and everything is built of multiple composable APIs, we started seeing things pop up. We've seen tools, like Mongo made tools to be serverfriendly. They're doing a lot of work to be this kind of accessible thing.
And so, PlanetScale is� is� I would say� part of that wave and I have found PlanetScale to be fascinating because you all are doing stuff that I'm not seeing in other areas of the space, one of the things that I find most interesting is that you've introduced the concept of branching to databases. I don't know if you're the only ones who do it. Can you talk a little bit about what this is. I feel like this is your killer feature.
TAYLOR BARNETT: Branching, many of us are familiar with branching because of Git and GitHub. That brought in what is the Git Flow and how do we work and have our code in these kind of separate environments, some ways. The thing was, it just never came over fully to the stack or the backend. You know, our frontend can be branched, but why not the data and the database. And there's some people who have done it, internally, some tooling exists out there. But not like an actually, like, commercial� like, someone that's a legit product, like, building it. And part of it's because every branch is a database. It's a fullyisolated environment.
And, then because of that, like, you have to handle, like, how do we merge? How do we handle all of these more difficult things? And so, one, part of that is possible because PlanetScale's built on top of this open source project called the Tuss that was started at YouTube years ago. It's out of CNCF. Slack stores all of their data in the Tuss. GitHub's using the Tuss. YouTube moved on because they changed some things.
It was created to help YouTube scale and, like, YouTube had some ridiculous scale. It's hard to� now we assume it's this big thing. But it went from 0 to 100 really, really quickly back, like, what 10 more years ago now?
JASON LENGSTORF: I definitely remember a time before YouTube. [Laughter]. It's hard to imagine a world without YouTube now. But I do remember, like, the moment when it started being one of the competing services that you would watch videos on. But, yeah� we� it could have been YouTube or maybe it was going to be ebomb's world. Who knew. [Laughter].
TAYLOR BARNETT: All of that was MySQL. Some of the biggest sites on the planet are all� all the data is on MySQL. So, back to the branching thing, the test is the underlying thing that makes a lot of PlanetScale possible. The branching piece, you know, so having to have� you know� your own, isolated environment� not just for production and dev, but maybe you're branching off for separate PRs. To test out the schema alongside your code and having a test database and then be able to merge that back in. The other cool thing about the merging is, like, especially for larger databases, that could be a pretty tricky thing to do. Like, merging changing schema while the app is still running and not having any downtime. We're not blocking the app from, you know, connections and doing queries. We do it in a very safe way, where it can still be running and all that going on while that merge is happening. Sometimes those merge requests take different amounts of time. For a really large database� for something that has very little data is a few seconds, most of the time.
JASON LENGSTORF: Branching, I think, is one of the really, really cool features. One of the other things that's cool about PlanetScale is it calls itself a serverless database and I think that there are� there are a couple entries in this space, but I think PlanetScale's doing something interesting here. If I use [audio cutting out] it doesn't matter if I hit it in a server or a serverless function or from the browser. Why does one need a serverless database versus a regular database?
TAYLOR BARNETT: Yeah. First, the term "serverless" five years ago, I kind of giggled at it coming from a backendfocused engineering background. There's so many servers. It's just that you're not managing them for structure that they're returning on so there's that piece to it. The other piece is, you know, in a serverless runtime environment, serverless function's becoming popular, many different offerings of them. Every function is going to create� like, in a traditional database� is going to create a connection to the database. You're very quickly going to max out connections. You know, some of these other databases that have traditionally been used, we're talking a few hundred can max out. And, like, what if you had thousands of functions running at once? You're going to start dropping connections, requests are going to fail. Like, you're going to run into these issues.
JASON LENGSTORF: This is, like, when back in the day, when everybody was running PHP. It was the Lamb stack. You build a website on top of that and every time someone came to your website, it would have to hit the server and the server would have to open a MySQL connection, get some data, make that data into a template assembly call and return and Markup. You could max out your connection pool and get weird errors. Oprah would mention it on her show and people would try to go to it and get a database error or a server error. It was because these tools are built for a finite number of connections.
So what you're talking about, here, is basically by going serverless, we're exacerbating that problem because each serverless function, they don't share that connection.
TAYLOR BARNETT: Totally. And the Tuss is able to handle these connections under the hood. It's what really makes PlanetScale special. But one of the things is, historically, I think where things were kind of going is, oh, maybe we can't use MySQL databases in this tradition way, anymore, because of these connection issues. PlanetScale takes a different look. We're like, no, you still can use a MySQLcompatible database, you just need different infrastructure. We've leaned really hard into MySQL because that is what is scaled so well with the Tuss. The Tuss wouldn't easily support other. When you think about the work that was initially done through YouTube and has been done by many other companies now, we are standing on the shoulders of lots of open source work that has been done.
We have a team, at PlanetScale, that help maintain the Tuss, too. They are just� they're working open source, basically, which is pretty awesome that we can have that. But, they're also the experts that help teach the rest of us, and PlanetScale, how to build on top of the Tuss. For example, that data function, that would have not been possible without some of the features of the Tuss that handle replication of tablets and stuff, very complex database stuff.
So, the connections piece, so a serverless database needs to be able a high number of connections. High availability. Needs to be able to scale without, you know, you having to go into a console and tell it to scale. It just needs to do it. You know, we've� if anybody remembers when we were first building on Heroku, having to spinup dinos and the dinos spin down. You can't have that. Your database needs to be available right now. And so, a serverless database, there's different pieces about it that is a little different. It's not necessarily a revolutionary idea. It's piecing together technologies that have taken a few years to come together.
JASON LENGSTORF: That's very cool. I could� I have so many questions, but I think it might be easier, at this point, now that we've kind of a groundwork laid, to start seeing this in action. So, let me switch us over to the desktop view here. And we will, first and foremost, for anybody who would like to this show with captions, they are on available on the home page of learnwithjason.dev. We've got White Coat Captioning. That is through Netlify, Auth0. Thank you for very much for that.
We've also got Taylor on the show. So make sure you head over to Twitter and follow Taylor.
We're going to be working with PlanetScale today. This is the website if you want to go and check there. We're going to do more with that. I think we're going to work with some more tools, but we'll introduce as those come up. How about we do this, if I want to get started, if I want to try out PlanetScale, what is Step 1 for me?
TAYLOR BARNETT: Yeah. Sign up. Get started. You might have an account already.
JASON LENGSTORF: I do have an account. I used GitHub to do it.
TAYLOR BARNETT: Yeah. Makes it easier. And also, for people, when they sign in the first time, we have a new, like, onboarding flow that actually explains branching. It's awesome to go through that. Ideas are ideas we know, but piecing it together with databases, sometimes you're having to make mental connections.
We've got a PlanetScale account. Let's also make sure that we have the PlanetScale CLI, it's called P Scale. If you go to PlanetScale/CLI, we have a whole page. Download the latest, I think, will give you the [Indiscernible] that you need to install it.
JASON LENGSTORF: Keep fingers crossed. I switched computers and that's why I don't have the CLI so we're just going to find out whether this computer's going to [Indiscernible] on me. Did it work?
Oh, dear, your CLT� oh, jeez. What have I done?
TAYLOR BARNETT: That's a new one for me. Is that something from Homebrew?
JASON LENGSTORF: What are you? Oh, no. [Laughter]. What�
TAYLOR BARNETT: When's the last time you homebrewinstalled something on here?
JASON LENGSTORF: I have no idea. Computer, it is a mutiny. [Laughter].
TAYLOR BARNETT: Everything that you can do in the CLI, you can do in the UI. You should be able to be all CLI, all the UI, or, like, some combination of both. The CLI, though, is helpful for those local connections so you don't�
JASON LENGSTORF: We're going to need it for the local connections, right? I can't do that with it. That's going to be a restart.
TAYLOR BARNETT: Well, we could but the actual connection stream with the password and everything in there, but then� you can still do it technically.
JASON LENGSTORF: Let's just try this and see what happens. Okay. You hackers, you dirty hackers!
Did I type my password right? I did. Oh, boy. Here we go. This� is this the one, that's, like, a billion� oh, 27 hours, 28 hours. This is going to go great. Oh, no, it's speeding up. Five minutes. Huh, huh? Look, everyone, I should have done this beforehand. Lesson learned.
TAYLOR BARNETT: Yeah. [Laughter].
JASON LENGSTORF: Here I was, thinking to myself, this is going to go great. It's not going to be a problem at all. And as usual, I was wrong.
So, while we are waiting for this to happen, which is going a lot faster than I thought it would� yeah� I will say, my favorite feature of� of Mac's installation tools is it's completely nonsensical time.
TAYLOR BARNETT: You don't get disappointed as much.
JASON LENGSTORF: It makes me laugh, so much, that usually when you start installing anything, it's like, this is going to take more than a day. Maybe just walk away. And� [Laughter]. Time to get a coffee. So, okay, let's look at a few things that we're going to need to do. I have one question, which is, I think if I remember correctly, the free plan only covers one database. Is that right?
TAYLOR BARNETT: Yeah. That is� that is� that is a thing. Um� [Laughter]. I can bump you up a little bit if you don't want to delete the one from Prisma.
JASON LENGSTORF: If you don't mind.
TAYLOR BARNETT: I have the power. Now everyone's going to DM me for free databases. Yeah, let me� I need to log in. One second, I'll get it.
JASON LENGSTORF: All right. All right. Here we go. Oh, did you put a dolphin and a wolf into the chat? What is a dolphinwolf? I'm very curious. What is a dolphinwolf?
[Laughter].
Um� shark wolf. How's this going? 12 minutes? You said four minutes.
[Laughter].
It was 10 minutes, five minutes ago. All right. So, this is going to be potentially problematic, but we can get pretty far in setting things up and, like, set up some of our frontend while we get the tools to run things locally.
[Laughter].
About random remaining, yeah, I think it might be that.
[Laughter].
This, at least, seems like� it is going faster than what it says, so, I'm happy about that at least. I need�
TAYLOR BARNETT: Okay. You should be able� you should be able to create more databases now.
JASON LENGSTORF: Hey, it's not yelling at me. Hurray. I have a question, I think I did this wrong yesterday at Prisma Serverless. If I'm choosing a region, I should not choose the region close to me, I should choose the region close to my serverless functions?
TAYLOR BARNETT: Branches can be in different regions. For developers on a distributed team, they would want something close to them because they're local. But where your production database lives, you would want it wherever the closer region to where your serverless function is going to run. So, those two are latencies a little bit less with those two.
We do have devs who will, like, make a branch closest to whatever region is to them because the� so you have to think, is this going to be running locally the most or running somewhere, production, the most?
JASON LENGSTORF: And what's interesting about this, if you're using serverless functions through just about any abstraction service, a lot of them are going to be based in Amazon's U.S. East. I'm going to choose U.S. East. What got me clued into this was Chris Biscardi is doing Rust Adventures� wait, where's Rust Adventures? I did it wrong. Let's see if I can find it. Rust Adventure. Not plural. But I just saw that Chris was putting up some, like, execution times and it was, like, under 20 milliseconds to execute a Rust function that also hit the database. It's so fast, it seemed broken. [Laughter].
TAYLOR BARNETT: We're seeing more regions. We did regions, first, with three and I think we're now� I actually don't know. 6, 7, something like that.
JASON LENGSTORF: That's wild.
TAYLOR BARNETT: The engineering team's got pretty good at deploying them in different places. Sometimes there's regulatory things we have to go through. But we're always� if anybody has requests, they're always down to here so when we're trying to decide where to go next, we can do that.
JASON LENGSTORF: Great. The rate that this is ticking down, we are actually about two minutes away, so fingers crossed. Although I guess this is the� the countdown bar that runs before it opens the next countdown bar. Next, I have to install the software. We'll see how all that goes.
So, I've created a database. We're calling this one LWJ. Thank you, Tony. And on this, I can see that I currently have one branch. And there's a bunch of information here, like, number of tables, number of branches, number of connections. Do you want to give us a bit of a tour of kind of what we're looking at here?
TAYLOR BARNETT: Yeah. Yeah. So, this is your database and, like, as soon as you created this, like, within seconds, you were� if you had tried, it could have made, like, a connection, which is amazing. If you've ever tested a database and some other stuff. So, your main branch. So, we give it the name "main." The idea's eventually that's your production branch that later� so right now, it hasn't been promoted to production. You can't drop a table on a production branch. We won't allow it. You'll get, like, a warning or it just� an error that tells you, hey, you can't do that, which is pretty nice. Things like that.
And so then, you know, most people when they're first getting started out, they know that "main's" going to be their production, they want to create a new branch in the UI or in the CLI to start doing some work.
JASON LENGSTORF: Yeah.
TAYLOR BARNETT: And, yeah. And then you also have the connect� yeah, let's see if P Scale will run.
JASON LENGSTORF: It should� should work. Oh. What's� is it version� yeah, there it is.
TAYLOR BARNETT: Yeah.
JASON LENGSTORF: Okay. So, we've got the latest P Scale CLI and I am now ready to� well, I'm not quite ready because I have to log in, right?
TAYLOR BARNETT: Yeah. If you do a P Scale Off login. I think. Cool, it wants to make sure that that matches what's in there. And it if those two match, you can confirm it. So that we know. This works because you're already logged into the browser so we don't have to have you do a separate login.
JASON LENGSTORF: That's handy. It's not to nice have to do a bunch of manual stuff.
TAYLOR BARNETT: Typing your password in a CLI is always weird, I think. So, we're logged in with P Scale. Everything you do, minus the fancy proxy connect, can also be done in the UI or in the CLI. Yeah.
JASON LENGSTORF: Okay. So, we have a database. Our database currently has no� no tables, no data. So, if we want to get to that point, like� let's say, for this one, let's track� I don't know, what do you think? Maybe some favorite songs?
TAYLOR BARNETT: Okay. Yeah.
JASON LENGSTORF: Do a song title and a Spotify link?
TAYLOR BARNETT: My favorite way to model data, in PlanetScale, is actually using Prisma. That's my top favorite way because I like writing Prisma schema. I hadn't using Prisma until 23 months ago and now I'm obsessed probably. I think you might have had Nicholas, from Prisma, on in the past. He probably gave the whole history of Prisma and how they avoided the ORM term.
JASON LENGSTORF: I'm setting up a repo here. So, we've got a repo. That's all up and running and so now if anybody wants to go and look, you can follow along with this repo.
But what I can do in the meantime is I'll open this thing up. Let's see...if I need to change any of the settings here. Because like I said, this is a� this is a new� where's my� oh! It was offscreen, that's why it was weird. So, here is our empty project and I'm ready to write some� am I ready to write some Prisma schema?
TAYLOR BARNETT: A lot of times I do "NPX Prisma Init." I'm imagining the development environment being used during a Prisma Serverless conference.
JASON LENGSTORF: We have� just looking at this file here, we just initialized an empty project. It's a default NPM Init so now we can�
TAYLOR BARNETT: And you're going to need the Prisma CLI, too.
JASON LENGSTORF: Install Prisma. Let's do that and I can do "NPX Prisma Init" and that happened real fast. So, here is our Prisma and we've got a schema.
TAYLOR BARNETT: Yeah�
JASON LENGSTORF: I'm going to install this, actually.
TAYLOR BARNETT: Later, when you're actually trying to query your database or add data, that's what you get the TypeScript, all the hints and all that stuff nicely.
JASON LENGSTORF: This syntax highlighting is nice, too. Plain text is so hard to parse sometimes when you're trying to scan a file.
TAYLOR BARNETT: I gave a talk for Next.js Conf. I misspelled something in the schema. It still worked. Somebody messaged me to let me know. They actually thought it was a bug in Prisma. I was like, no, that was me typing live incorrectly. But, yeah, so it'll give you a little bit of help in your schema.prisma file, too, which is helpful.
So, a couple of things, so, one, um, we need to change the provider to MySQL since we're going to be using a MySQL database. Let me pull up...
JASON LENGSTORF: So, MySQL. Okay.
TAYLOR BARNETT: And then, um...URL is good. That's what it should be. Then we need to add the shadow database URL.
JASON LENGSTORF: This is going to autocomplete now that we've installed� yes. I love it.
TAYLOR BARNETT: And then we just want to update� yeah� that.
JASON LENGSTORF: Okay.
TAYLOR BARNETT: I was just looking at my Prisma code so I make sure I don't forget anything. Sorry. And then up in the� oh, there's one more. What am I forgetting? One second...I think we need to turn on the referential�
JASON LENGSTORF: It's "preview features" right?
TAYLOR BARNETT: Yeah. Referential integrity.
JASON LENGSTORF: There we go. And then to talk through this a little bit, the shadow database, what� what is this one doing?
TAYLOR BARNETT: Yeah. So� so, Prisma migration tool kind of tracks how there's been drifts in your schema.
JASON LENGSTORF: Uhhuh.
TAYLOR BARNETT: And it does that with this idea of a shadow database.
JASON LENGSTORF: Okay.
TAYLOR BARNETT: I think� let me� uh, it's like� it's a temporary database that you don't actually need on production. I know sometimes people ask, do I need that environment variable in production? You can literally not add it when you're deploying to Netlify or whatever because we only look to the URL. It is used when you run Prisma Migrate and it helps track those diffs and changes in your Prisma schema. I recommend reading the Prisma Database. It goes a lot deeper about how it works. But, the most important thing is, like, you need it to do Prisma Migrate. If you're never going to do a Prisma Migrate, you don't actually need it.
JASON LENGSTORF: If we think about it, not necessarily exactly what it's doing, but what it's for, Prisma gives you the ability to make a change to your schema and it will update the client and do a whole bunch of housekeeping and accounting work to make sure things work. From the way they describe it, it sounds like the shadow database is so you can compare and they're like, okay, clean up and empty the database. You would never do that work on your website.
So, then� okay. That's what the shadow database URL is. And referential integrity, this is interesting because I don't quite know what this means. And I also find it very amusing that we have to set a Prisma setting to Prisma.
TAYLOR BARNETT: It was slightly different a few versions ago, in Prisma, and now I already forgot what it was called? We were working with the Prisma team partially to make this workflow work because initially there were some blockers to using Prisma with PlanetScale. We are working� can we make the shadow database experience better? Things like that. So, referential integrity� it's a big word. I always misspell "referential" a lot. Has to do with this idea of having consistency of data between relations in your database.
JASON LENGSTORF: Got it.
TAYLOR BARNETT: PlanetScale doesn't support foreign key constraints. It's a tradeoff for us being able to have the branching and the schema changes all these nonblocking schema changes and all these migrationnice developer experience features. So what Prisma actually does, when that's turned on, they� it knows not to try to make any foreign keys and it passes that job� or that work� off to the Prisma client and then the Prisma client can handle that. So you could actually technically have foreign key, like, relationships in your schema. Which if you just used, as raw schema on PlanetScale, wouldn't work. You'd get some� PlanetScale would give you some error messages. But in a Prisma schema file, you can and then the client will handle it. It's telling the Prisma client, hey, don't try to do these foreign keys in the migration.
I've been wanting to dig into the very deeper, technical thing of how the client actually handles it's more. That's something I'm soon to learn.
JASON LENGSTORF: Speaking for myself� and speaking for who I know a lot of the folks watching, how much we do with databases� for most of us, this isn't a feature that we're going to miss because it's not something that we're using now. I think� certainly, somebody who's heavy into database and MySQL would be like, wait, I can't use this thing that I use all the time.
TAYLOR BARNETT: Yeah. And that is a common thing I've heard. I think actually sometimes we are doing some of those relationships and don't always realize it in our Prisma schema because it is a layer on top of the actual SQL. But, what was really cool was like, I took a Prisma schema from an example of something else and it had those in there and I was all worried that I was going to have to remove them and change the data model, but I ran Prisma Migrate and it just, like, worked. And I was like, okay, cool. Like, I can just move on.
You know, and we also have some really good docs about how to operate without foreign keys so if somebody's really concerned about that, we explain why we made the decision and how to do data modeling without, too.
JASON LENGSTORF: Cool. Okay. Well, let's� we'll leave any deeper exploration on that since it's something, for me as a frontend developer, I will care about it when I need to care about it. That's generally how I approach a lot of development these days. If I hit something that requires further, deeper research, I will. But for now, I trust the tools I'm using. Is there anything additional we need to configure?
TAYLOR BARNETT: Besides starting to put in the model itself, no.
JASON LENGSTORF: Let's build in a model. The keyword for that� is the keyword "model"?
TAYLOR BARNETT: And then the name and then curly braces.
JASON LENGSTORF: We want this to be "songs."
TAYLOR BARNETT: Or singular, "song."
JASON LENGSTORF: Let's give it a URL. Anything else you want to track on these?
TAYLOR BARNETT: That sounds good for me. Yeah.
JASON LENGSTORF: All right. So, then we need to do more, I assume, because it's mad at me.
TAYLOR BARNETT: Yeah. It needs to go what the actual types are.
JASON LENGSTORF: Okay.
TAYLOR BARNETT: So, ID, it could be a string. And I think, actually� I didn't realize this, when you save it, it will automatically format everything.
JASON LENGSTORF: I noticed that.
TAYLOR BARNETT: I did not know that and looked like a dork fixing my spacing while I was recording for Next.js conference.
JASON LENGSTORF: If you are livecoding and you don't look like a dork, are you even livecoding?
[Laughter].
TAYLOR BARNETT: I was like, here, let me make my lines look all pretty. [Laughter]. The ID could be a spring�
JASON LENGSTORF: Is that capitalized or lowercase?
TAYLOR BARNETT: Capitalized. And do a space. The @ID. And then, you space again. We wanted to automatically create these IDs for us. I� in default� is a great way of doing that and inside of there, put "CUID." It's� you know, we're not going to have collision of IDs. It's not autoincrementing it. It's an API security issue sometimes to have things being in 1, 2, 3, 4, 5.
JASON LENGSTORF: I just realized something.
TAYLOR BARNETT: Yeah?
JASON LENGSTORF: Because this is all, like, Prisma's generated stuff, I can hit "Ctrl+space" and get stuff.
TAYLOR BARNETT: Different providers are going to have different types.
JASON LENGSTORF: Oooohhhh. That's cool.
TAYLOR BARNETT: If you're doing a SQL Lite, it's going to have different types than MySQL kind of thing.
JASON LENGSTORF: You can do this, too. Oh, okay, I'll make it unique. Like, I love this.
Okay. So, this is our database. We� and I just saved and it did the autoformatylineyuppything. That's the technical term for it, I believe.
TAYLOR BARNETT: Every time� I would try to, like, space it out ahead of time, but then the next word I would type, like, "title" was longer and I was like, dang it. I have to have one more tab. [Laughter]. Yeah.
JASON LENGSTORF: Okay. So, this is a pretty simple database, but it would grow over time. Maybe we want upvote features, maybe we'll want user accounts. For now, we want our proofofconcept. Can I store a list of my favorite songs?
TAYLOR BARNETT: Totally, yes.
JASON LENGSTORF: Am I done? What happens next?
TAYLOR BARNETT: Yeah. So, our goal is that we could, one, we want to get the schema up on PlanetScale, but then we also want to, like� I guess we could� I don't usually do it where I don't have, like, the actual application code, usually first. But I mean, a Prisma Migrate would work in a situation, given we do a couple more steps that I will share. We can do the Prisma Migrate so we can see our schema up on PlanetScale. In order for Prisma Migrate to work, we need our environment variables, those two environment variables and, Prisma does the nice thing of creating a file for us.
JASON LENGSTORF: Oh, hold on, I think I have a plugin here. What's it called? Cloak? I need to turn this off, because we're not going to need it today. So then when I open the�.n file� you are supposed to be off. [Laughter]. Get out of here. Nope. Cloak. Can't spell. I guess we're going to uninstall it then.
TAYLOR BARNETT: Does it usually work pretty good? I'm just curious because I was looking for something recently.
JASON LENGSTORF: So my issue I've run into with Cloak...why�
TAYLOR BARNETT: It's hard to turn on and off. [Laughter]. Sometimes that's also just the�
JASON LENGSTORF: This is going� that's not it.
TAYLOR BARNETT: The V S Code extensions are weird sometimes.
JASON LENGSTORF: Yeah. I'm not sure while this is fighting me. Let me close it. It's not the end of the world if it doesn't want to� okay. I don't see� this is why we can't have nice things. So the way that that works is it basically finds whatever the environments variable value is and it just hides it. I will get these set up and then we'll put these in here. And then, if I type, it just� it just masks all that. It's a really cool thing, but the problem with it is sometimes, every once in a while, it flashes and when it's on video, even one frame is too many so I've just largely not used it. What? Go away. Not now. Oh, I think that's what's going on. This needs to update and it's probably keeping old settings until it updates. I'll deal with that at a later date. Today's not the day. So... [Laughter].
TAYLOR BARNETT: So, um, for� for� for everyone to understand, we are going to run a proxy to our PlanetScale database locally. And so, we want to tell Prisma where is the database and so it is going to actually be, like, it's local but it's going to proxy out to a database actually on the cloud. And so, in that database URL, we're going to need�
JASON LENGSTORF: I'm going to type it down here and then copy/paste it so people can see it.
TAYLOR BARNETT: MySQL:
JASON LENGSTORF: Are we serious?
[Laughter].
TAYLOR BARNETT: Did it just disappear again?
[Laughter].
JASON LENGSTORF: Oh, my God. You're the worst. MySQL://root@127
TAYLOR BARNETT: You can do a local host, too. :3309.
JASON LENGSTORF: Can I choose any available port?
TAYLOR BARNETT: The Prisma one, we started doing that. We don't want to make someone decide what port necessarily. I would probably be paralyzed by decision. And then the database name.
JASON LENGSTORF: This is going to be the database URL. What about the shadow database. Is it the same?
TAYLOR BARNETT: Same thing, with a different port. I do "3310."
JASON LENGSTORF: Let's take the first one here. I'm going to go back here and put it in my database URL. We'll take the second one and that's going to be our shadow database URL. These don't work yet. Let me make sure I didn't add any� good. That's all gone. All right. Um, so these are set. But these are not yet running.
TAYLOR BARNETT: Correct.
JASON LENGSTORF: Okay.
TAYLOR BARNETT: So go over to our terminal then and let's get connected to them. So that will be P Scale Connect.
JASON LENGSTORF: Do I need to create the branches first?
TAYLOR BARNETT: We didn't create the shadow branch. We can use the Main as� it's� we're going to eventually� when I'm doing that first one, I let Main and promote Main to be the production branch later. Because I'm� there's nothing on there, so I'm, like, doesn't hurt. Now, if it was in a situation where you had an existing main branch that you didn't want to touch, you'd want to create a dev branch and still have the shadow branch.
JASON LENGSTORF: We can use Main since it's empty. We need to create a shadow branch.
TAYLOR BARNETT: Yeah, so P Scale Branch...is it within the database? No. Hold on one second. I always forget the ordering. Actually, you can just do "help." No branch, create. And then� let me make sure. Create a branch for a database...it's going to have to have the database name in there and I think it's� yeah. Source database. P Scale, Branch Create, LWJ.
JASON LENGSTORF: We have a branch database and a shadow database and now we need to connect to both of those?
TAYLOR BARNETT: Correct. P Scale Connect�
JASON LENGSTORF: I need to use separate terminals for this, right?
TAYLOR BARNETT: It ends up having three tabs, usually, at that point.
JASON LENGSTORF: Is this the right command?
TAYLOR BARNETT: Port and then�
JASON LENGSTORF: 3309.
TAYLOR BARNETT: So that should connect.
JASON LENGSTORF: And that connects and there's the 123. Same thing. P Scale Connect, LWJ shadow. 3310. No!
TAYLOR BARNETT: I do that. [Laughter].
JASON LENGSTORF: Hey, thanks for the raid. We're playing with databases today. We're using PlanetScale, using Prisma and we're eventually going to get into some Next.js. I've got two database branches. We've got a schema Prisma. I can migrate?
TAYLOR BARNETT: Yeah. I think� for one second, let me say what's going on with those connects, we're proxying using the auth that you've logged in through the CLI so then you don't have to handle, like, the� creating a password for doing these. Really only want to do the password stuff if I'm actually in production. So then I don't have to constantly create more passwords and, like, more passwords, potentially higher risk of, you know, one of them leaking or something or just� it makes it so much cleaner, you know, just connect. Just do it for me.
JASON LENGSTORF: And a couple things, also, if I understand correctly, I can't connect to, like, a production string, modify my schema. I'm pretty sure that was what I tried first and I got permissions errors.
TAYLOR BARNETT: If you have turned that on as your production branch. We call it "promoting to production."
JASON LENGSTORF: I was just doing everything wrong. I definitely did not read the docs. I just started trying to write code. [Laughter].
TAYLOR BARNETT: You shouldn't necessarily need to read the docs. I would say the onboarding steps are pretty good and from there, I would hope that most people, who are somewhat familiar with databases, could run with it. I know we actually�
JASON LENGSTORF: And that was my mistake. Not somewhat familiar with databases. [Laughter].
TAYLOR BARNETT: I mean, yeah. I used to run into a few� I think that error, that you got, if you pasted that into the docs, we literally have a page to tell you what's going on right there. Because we know that that is a thing that happens and we explain, like, hey, we did this for your own good. [Laughter].
JASON LENGSTORF: Okay. So, let's� let's get our database set up so that we can actually start loading and reading some data here. Do I just run Prisma Migrate?
TAYLOR BARNETT: NPX Prisma Update. It's going to ask you�
JASON LENGSTORF: Data source, database. It's using Learn With Jason. It has our main branch at 3309.
TAYLOR BARNETT: And it's probably going to ask for a name.
JASON LENGSTORF: We'll call it "init," because why not? So it created a migrations thing so we can kind of� if we want to look, we can see what happened and it created a table for us.
TAYLOR BARNETT: The raw SQL that you did not have to write.
JASON LENGSTORF: While I could have googled how to do this, I would have screwed it up. This is nicer for me, I've written GraphQL, I've defined what it looks like. This doesn't feel too far from that. Right.
TAYLOR BARNETT: One really cool thing about the schema file is to me, it's very portable. It's really leaning into this idea� I call it databasesascode. I can literally take this and create another database with it. Like, it's not� nothing about that file is specific to the database that we have here. Other than the environment variables.
JASON LENGSTORF: And you know what I like about that is we're moving into this world where a lot of times what people want is a quick starting point and so, being able to put this right into your� your starter template and say, yeah. So, you've already got this so if you have a database available and you update your environment variables, run this command and we'll bootstrap your database. I'd assume you could put seed data.
TAYLOR BARNETT: Prisma has a way to write seed scripts. Let's going back to the PlanetScale web app and we can actually see the schema inside our main branch, too.
JASON LENGSTORF: Oooh. Neat.
TAYLOR BARNETT: That Prisma Migrate� you'll have to go� if you scroll up, all the way to the top, and go to "branches."
JASON LENGSTORF: Branches.
TAYLOR BARNETT: And click on that Main and the schema at the top, you might have to click the refresh button because sometimes it hasn't pulled down.
JASON LENGSTORF: Cooool. Also, I see you making fun of me, Dom. Don't think I don't see that. I'm coming for you later.
TAYLOR BARNETT: That's the name of a SQL GUI.
Sequel Pro has had Sequel Ace. Also, it doesn't know� I think it support said SSL connections. PlanetScale will not make a connection without SSL. We will only make secure database connections. Table stakes for us on security. That schema just reminded something we should go do while we're in here. It had that migrations table.
JASON LENGSTORF: Yes.
TAYLOR BARNETT: I know you talked about it at Prisma Serverless Conf. If we're making a lot of migrations and changes for our hackie thing. It isn't going to break anything if we hadn't turned it on. The Prisma Migrations are tracked on the branch. So if anything needs to be done with�
JASON LENGSTORF: Oh, so this gives you visual� like, you can see things through time and space here?
TAYLOR BARNETT: We are� if you look at the schema for that migrations table, that's automatically created by Prisma, if you go back to branches and then "main" and then "schema."
JASON LENGSTORF: This is automatically created by Prisma. So over time, we'll get these correlated a little bit. I want to come back here, because this was extremely cool where you show a comparison of [Indiscernible].
TAYLOR BARNETT: Later, we can add� add a column or something and, yeah, we can do that, totally.
JASON LENGSTORF: So, we did the thing.
TAYLOR BARNETT: I just wanted to say the Prisma Migrations thing, it's a thing a lot of ORMs do. I think it would be cool if we could autodetect now. Now, you just go tell us which one you're using or if you have a custom table name. [Indiscernible] will have its own and then, like, Typer, whatever you're using.
So, our schema is now on our main branch.
JASON LENGSTORF: It's in there. All right. From that, we should, theoretically speaking, be able to connect and write to our database. So, is there, like, a fast way for us to try that out and make sure it works?
TAYLOR BARNETT: Yeah. Do we want to initialize, like, a Next project and add a page to do an API route to do that, to get�
JASON LENGSTORF: We've got roughly 15 minutes left in the episode so what we might want to do is let's seed some data in. Let's write to the database and maybe we can stand up a next API to route it out.
TAYLOR BARNETT: The Prisma Studio, we can add the data. NPX Prisma Studio, I think, will do it.
JASON LENGSTORF: Hey, there's our song.
TAYLOR BARNETT: And we can add a record.
JASON LENGSTORF: And so the first one, chat, I'm going to put about five songs in. So, drop up your favorite songs. I'm going to open up Spotify and look for some goodins'. What have I liked lately? This is going to be a good� here's a great one. I don't know if you've seen the video for this song yet, but it is stellar. It is so, so, so good. All right. So, Smoking Out The Window. Probably should have included artist in here, but, hey, we don't have time for that anymore.
TAYLOR BARNETT: I feel like we got trolled by Nickelback.
JASON LENGSTORF: Why didn't that work? Oh, it did work. It just timed out.
TAYLOR BARNETT: If you don't hit "enter" after you do the URL sometimes, it doesn't save the URL.
JASON LENGSTORF: I am going to, uh...so, if for everybody who is not aware, Dom works at Netlify�
TAYLOR BARNETT: I like how it's not even the first one.
JASON LENGSTORF: This is going on his permanent record. This will be reflected in your next review. Okay. What else you got? What else you got, chat? Hit us with songs. Taylor, what's your current favorite song? Not to put you on blast like that.
TAYLOR BARNETT: I don't even know. This is weird. Um� oh, I've been listening to a lot of TV on the Radio. That's what I listen to when I'm trying to get shit done. I don't know any of the song names. I play it on auto and it goes. Whatever the first one is when you go on Spotify.
JASON LENGSTORF: Let's get TV on the Radio. And let's� Wolf Like Me.
TAYLOR BARNETT: That works. I think that's a good amount after that.
JASON LENGSTORF: Yeah, I think that's about all we have time for. A Wolf Like Me.
TAYLOR BARNETT: Create next app.
JASON LENGSTORF: Is it NPM, init, create next app? What is the right?
TAYLOR BARNETT: I did it, just, like, three weeks ago, last time I ran that command.
JASON LENGSTORF: Getting started. They have NPX. Let's do that. There we go. This was� what did we call it?
TAYLOR BARNETT: Song API or something.
JASON LENGSTORF: I'm just going to copy this in. Oh, is this going to do� shit, shit, shit, shit. Is this going to break because it doesn't want to� oh, no! All right. Here's what we're going to do. We're going to create an app folder and that's going to be fine.
TAYLOR BARNETT: So Next.js does the filebased routing so then we can just go into the pages that it creates the API and just create a� yep.
JASON LENGSTORF: Okay. So, we've got access to songs here. And, we want to get� so, like, our todo here is connect to the DB. And then in here, we want to load songs. Right? So�
TAYLOR BARNETT: We can literally do� well, um, yeah. Connect to the DB. I usually� we'll skip that. I usually create, like, a liv Prisma.JS so I have one client I'm pulling from every time instead of creating new clients for every single request.
JASON LENGSTORF: Gotcha. I can do that. We use JavaScript, so JS.
TAYLOR BARNETT: And you installed the Prisma, I can't remember if they're separate or not.
JASON LENGSTORF: I think we need this one.
TAYLOR BARNETT: For the client, yeah.
JASON LENGSTORF: How do we get the Prisma client to know about our schema?
TAYLOR BARNETT: When we ran Prisma Migrate, it created a client.
JASON LENGSTORF: Don't they have a "generate" command?
TAYLOR BARNETT: I think it ran when you ran Prisma Client, not Prisma Migrate. It would have been in the thing, but I could be wrong. I would have to look back real quick. Uhhhh...a little bit higher. You just passed� you passed it. When you ran Prisma Migrate, so a little bit further down. When you run Prisma Migrate, it is creating a client based on your schema.
JASON LENGSTORF: It ran "generate. I understand.
TAYLOR BARNETT: There it is. Generating Prisma Client.
JASON LENGSTORF: Hopefully I didn't break it when I ran this. [Laughter].
TAYLOR BARNETT: I pasted it into DMs, if you want to make it a little bit faster, the code that I use for client�
JASON LENGSTORF: I'm on two computers here, so I'm going to have to make it fast, but that's fine. So, we'll go� the Prisma is going to be either global.prisma or a new Prisma client.
TAYLOR BARNETT: Correct.
JASON LENGSTORF: And then if process.n is development, we will set global.prisma to Prisma. All right.
TAYLOR BARNETT: And then export that.
JASON LENGSTORF: Okay. So, we've got that and here, in Songs, we can import Prisma from� go up one more to Prisma. If I remember correctly, this is just going to autocomplete, right? Prisma.song�
TAYLOR BARNETT: �.findmany.
JASON LENGSTORF: If I call it, that's everything, right? We can do it like this and that'll give us all our songs?
TAYLOR BARNETT: I usually throw it into a [Indiscernible] cache.
JASON LENGSTORF: Today�
TAYLOR BARNETT: We're living on the edge.
JASON LENGSTORF: I think we can try it. I'm going to Netlify� oh, wait. Hold on. I'm on a new version of Netlify CLI. This should take just a second here. Um...and then, what this will let us do is run, like, a local serverless proxy and, uh, pull our environment variables, if we needed to. This will autoload. Run here. What do you mean, it's not� we literally just installed it. I guess we'll just do this for now? There it goes. I don't know why it did that. Um, so, we don't have one of these, but we should have one of these. And nothing is working. Because no apps server were detected. Oh, oh, oh, because we're not in the app folder. Okay. Try that again. So, there it is goes. And this should work...it doesn't like�
TAYLOR BARNETT: I think it changed�
JASON LENGSTORF: Schema.prisma. Ah, crap! We did something� I think I need to move all this to the toplevel.
TAYLOR BARNETT: Oooohhh.
JASON LENGSTORF: Because I think it's trying to find� shoot. What if I� so, what if I just move this one out? Nope. Nope. Come on, come back. How do I get you to come back? There we go. I'll move this one out. And then I'll� theoreticallyspeaking, this should already be fixed. I look at list, app, song, that's fine. Let's do this. Try it again...
TAYLOR BARNETT: This is different.
JASON LENGSTORF: Still doesn't� okay. Let's try that one more time, now that it is� still doesn't find our schema. Hmmm...
TAYLOR BARNETT: Something� let me think...uh...maybe�
JASON LENGSTORF: Oh, oh, look at this� this import is weird.
TAYLOR BARNETT: 0ooohhhhh. Yeah. I see.
JASON LENGSTORF: I must have autocompleted that or something. There are our songs. Hey! And, so we're now pulling our songs from�
TAYLOR BARNETT: PlanetScale.
JASON LENGSTORF: From PlanetScale used a Next API route. And I want to see if, in five minutes, we can deploy this dang thing. So I'm going to do� do we still not have� okay. It's here. Let's Netlify login and this will take� I'm already logged in. Great. So, let's Netlify Init. I'm going to create and configure a new site. I'm going to put it on my team. We're going to call this one, here...okay. And, it's going to be� did we not push to this repo?
TAYLOR BARNETT: Is it because� hmm.
JASON LENGSTORF: Should be okay here. Let's get at everything and make sure we didn't doublecommit anything. This should all be good. I think we're� I think what we're going to get into trouble here is we have this double package. I think I need to refactor this so maybe we're not going to be able to deploy it because what I need to do� or maybe we can. I don't know. Let's see. If I take these dependencies out and I move them over into this package JSON and, then I take these dev dependencies and I move them into this package JSON...and then, I can�
TAYLOR BARNETT: Delete the other one.
JASON LENGSTORF: Delete this. I can move and delete this...right. And then, um...I needed in command.
TAYLOR BARNETT: I was about to say, does it have the nextrelated�
JASON LENGSTORF: So we can just run� it's just Next Build, right?
TAYLOR BARNETT: Yeah.
JASON LENGSTORF: Is that right? NPM Install. So, Eco, I could have used a base URL. Here's the problem, it would have moved into the app and then not done any of the Prisma stuff and we need that Prisma client to exist, and all those things. So, let's NPM Build. Couldn't find a pages directory. Okay. I'm just dragging all this to the top. We're going to move all of this up to� I don't know� I don't need that part. So, let's move this to the toplevel. We're going to move it all. Git Ignore, that should be pretty similar. So, let's� oh, way, nope, nope. We need to echo.nev into our Git Ignore. Let's echo Netlify into the Git Ignore. Let's Git Add anything. Migrations are supposed to go in, right?
TAYLOR BARNETT: Yes.
JASON LENGSTORF: So I am going to fix that API route import because we just changed the location so that should be just one� one less layer up, I believe. Right? One, two� there it is. Yeah. All right. So then we can Git All again, Git Commit and say, API works. Then we can Git Push Upstream Origin Main and that'll take our site up there and then if we Netlify Init from here, this should actually work because it will do all of the things� this repository definitely works.
Okay. I'm just going to do this part later because something has gone sideways from me and I'm going to assume it's because I installed a bunch of CLI and didn't configure it. You'll be able to take this up live and hit a route on a final site.
With that being said, Taylor, where should people go if they want to do more here?
TAYLOR BARNETT: Yeah. Um, so a few things, one, we're going� we have more Prisma content coming out, from PlanetScale, so you can watch our Twitter. Of course, we always release stuff there. If you want a very� if someone wants a very basic walkthrough of the PlanetScale flow, if you look up a repo, inside of PlanetScale, called Next.conf, I think� I think that's what I titled it� nope.
JASON LENGSTORF: Is PlanetScale the org, did I get that right?
TAYLOR BARNETT: Yeah, yeah, that's the correct org. Let me see...what did I call it? Next.js...oh, Next.js2021. So, there's the starter that we also� so, that one. This, right here, the YouTube is linked. This is a great walkthrough of how to go through PlanetScale and Prisma, that I did for�
JASON LENGSTORF: This is the talk?
TAYLOR BARNETT: Yeah. That I did for Next.js. If you are interested in Next Auth, what we released is right here. It is with Prisma and PlanetScale, too.
JASON LENGSTORF: Speaking of all the things you did last week, didn't you also write a blog on the Netlify site about this?
TAYLOR BARNETT: About that starter app, yeah. Yeah, I had, like, four blog posts this week. [Laughter].
JASON LENGSTORF: Jeez. All over it. I mean, this is great. Like, this was superfun. I feel like we learned a ton. So, everyone, go and make sure you follow Taylor on Twitter because it's just� clearly, just a fountain of information. This episode has been livecaptioned. We've had White Coat Captioning today. Thanks to them. Netlify, Auth0.
If you have gift subscriptions, thank you. I use those to pay for the show. It makes the show better, the more money we have in the sponsorship pile, the more we can do. We've been doing highlight videos lately, which I'm really excited about.
TAYLOR BARNETT: I saw the one with James.
JASON LENGSTORF: I'm so happy about this. It's something I wanted to do forever and we finally hit a sponsorship level we can. Keep hitting that subscribe button. It means a lot to me. While you're checking things out on the site, check the schedule. Took at all these people. It's going to be great. Hit the add on Google calendar button and follow on Twitch.
Taylor, any parting words for everybody?
TAYLOR BARNETT: No, this has been awesome and, yeah, if anybody has any questions, feel free to reach out. Doesn't just have to be Next.js, can be other related things. We're looking at what other frameworks we'd love to show examples with, with PlanetScale. Yeah, just let me know.
JASON LENGSTORF: All right, y'all. This has been a blast. Thank you, Taylor. Thank you, chat. We are going to go find somebody to raid so staytuned. Taylor, thank you very much. We will see you all next time.
TAYLOR BARNETT: Bye.
Learn With Jason is made possible by our sponsors: