WEBVTT

00:00.080 --> 00:05.150
So now we're ready to start up all of our containers and test our application end to end.

00:05.180 --> 00:09.140
I'll run Docker compose up to start up all of our containers.

00:10.230 --> 00:16.080
So with everything now running, let's head back to postman where we can test out our APIs to make sure

00:16.080 --> 00:18.060
everything is working as expected.

00:18.090 --> 00:25.260
To start off, I'll go ahead and create a new user here using the Auth Users API.

00:25.770 --> 00:27.750
So I've gone and created my user.

00:27.750 --> 00:32.730
I'll now obtain a JWT for it and hit the auth login route.

00:32.730 --> 00:39.810
And now we're going to execute this post request at localhost 3000 slash reservations to actually create

00:39.810 --> 00:41.040
the reservation.

00:41.040 --> 00:44.340
So we'll go ahead and send this reservation off.

00:44.340 --> 00:48.990
And you can see we've successfully created it with a 201 created.

00:49.140 --> 00:52.380
And we get the reservation back which is excellent.

00:52.380 --> 00:57.210
This means our system is working end to end with Prisma and Postgres.

00:57.210 --> 01:03.690
So now if we head back to Pgadmin, I'll go ahead and refresh our databases, and let's go ahead and

01:03.690 --> 01:10.110
check our tables to see the data that we have now to verify everything is working as expected.

01:10.110 --> 01:15.930
So I'll go ahead and right click on our user table and view all rows.

01:15.930 --> 01:19.020
And now we can see the user that we've just created.

01:19.020 --> 01:21.450
So this looks just as we'd expect.

01:21.450 --> 01:28.050
And let's check out the reservations database where we can look at our tables here where we have the

01:28.050 --> 01:33.090
reservation table I'll right click it and view all rows.

01:33.090 --> 01:36.090
And here is the reservation that we just created.

01:36.570 --> 01:39.330
So we can see we have Prisma working end to end.

01:39.420 --> 01:46.560
Our application running in Docker to persist data as we'd expect, generate the latest code from our

01:46.560 --> 01:53.340
schemas and automatically generate these migrations to ensure that the database is always in line with

01:53.340 --> 01:55.050
the schema that we've defined.
