0:00 All right, so we're finally ready to start 0:02 implementing our authentication on our 0:04 NestJS backend. And to do this, we're gonna utilize Better Auth, which 0:08 is one of the most popular open source authentication 0:11 libraries, as it's totally framework agnostic 0:15 and allows 0:15 us to implement secure JWT authentication with very little 0:19 code. 0:21 Now, before we set up Better Auth, we're gonna need to set up our persistence 0:24 layer, or in other words, our database connection, so that we can 0:28 actually build out our database schema that Better Auth will use, which will 0:32 consist of saving the actual underlying users that we create, 0:36 their sessions, and 0:38 other details around authentication. 0:41 So we need to make sure we set up a database connection to a database running 0:45 on 0:45 our system, and then implement an ORM so 0:48 that we can connect 0:49 our NestJS backend to the database. 0:52 Now in this course, we're gonna utilize Drizzle ORM as our ORM 0:56 of choice 0:56 to connect our Nest code to a Postgres database. 1:01 So let's go ahead and get started with implementing Drizzle 1:04 ORM to connect to a 1:05 Postgres database. Now before we get started, 1:08 you're of course gonna need to make 1:09 sure that you have Postgres running on your machine. 1:13 I will leave a link below on resources on how to 1:16 install Postgres on all operating systems. 1:19 In my case, I'm running on macOS, so I'm using 1:22 PostgreSQL, a desktop client, in order to run it. 1:26 However, feel free to use any Postgres client you 1:29 want, as long as you're 1:30 able to run a Postgres server locally. 1:33 And again, I will leave a link below where you can 1:35 find instructions on how to run 1:36 it. As well as having a Postgres database 1:39 running locally, 1:40 we also wanna make sure we install a GUI tool that we can use to connect
The rest of the transcript is for members.
Sign in