1
00:00:02,660 --> 00:00:10,880
Okay, so we just completed the part three, which as you saw, is a very easy, uh, part of this process.

2
00:00:10,880 --> 00:00:18,110
And we are going now to the part four, uh, in order to deploy the back end on render.

3
00:00:18,110 --> 00:00:21,320
Com, these are the steps we are going to cover.

4
00:00:21,320 --> 00:00:29,420
And you will see that these steps are super well explained in the notebook here on the right.

5
00:00:29,420 --> 00:00:33,950
So the first thing is we are going to upload a the back end to GitHub.

6
00:00:34,040 --> 00:00:35,720
And we will show you how to do that.

7
00:00:35,720 --> 00:00:42,110
If you are not familiar with GitHub then you will create a free account on render.com.

8
00:00:43,310 --> 00:00:47,150
A and then you will create the database in render.

9
00:00:47,150 --> 00:00:53,540
Com because if you remember the database we were using is a database we have in our computer.

10
00:00:53,540 --> 00:00:56,420
So we need to put the database in the cloud.

11
00:00:56,420 --> 00:00:59,450
And we will do this in render a.

12
00:00:59,450 --> 00:01:05,660
And after we create the database remember we need to create the table which is the one of the last things

13
00:01:05,660 --> 00:01:07,490
we are going to do here in this list.

14
00:01:07,490 --> 00:01:12,320
So a we will create a web service on the render.

15
00:01:12,320 --> 00:01:14,570
Render com is super easy.

16
00:01:14,570 --> 00:01:17,060
We will import the backend from GitHub.

17
00:01:17,570 --> 00:01:23,840
We will include the environment variables because remember our dot env file is not going to GitHub.

18
00:01:23,840 --> 00:01:28,430
We are prevented it with the we are preventing it with the dot.

19
00:01:28,430 --> 00:01:29,810
Gitignore file.

20
00:01:29,810 --> 00:01:30,590
Remember.

21
00:01:30,770 --> 00:01:36,680
So we will need to enter the environment variables in render.com.

22
00:01:37,420 --> 00:01:44,020
We will create a table and then we will confirm that everything works fine.

23
00:01:44,590 --> 00:01:45,190
Okay.

24
00:01:45,460 --> 00:01:50,860
Then here in the right, you have all the instructions.

25
00:01:51,340 --> 00:01:58,540
I am very confident that this will be like that, uh, for many months.

26
00:01:58,540 --> 00:02:05,710
But, you know, sometimes platforms, frameworks change and some of these steps can change.

27
00:02:05,740 --> 00:02:07,060
Don't worry about it.

28
00:02:07,060 --> 00:02:10,990
If you have any trouble during this process, you know where to go.

29
00:02:10,990 --> 00:02:19,390
You have the render.com documentation, you have chat, GPT four, etc. etc. etc. but this process a

30
00:02:19,570 --> 00:02:20,950
should be.

31
00:02:21,700 --> 00:02:25,690
You see, for you, the first time is a little bit, uh.

32
00:02:25,690 --> 00:02:31,810
Well, some things can be can be a little bit cumbersome for you, but I think the second or third time

33
00:02:31,810 --> 00:02:35,890
you do this is going to be a fairly easy and fast for you.

34
00:02:35,890 --> 00:02:39,730
So the first thing you need to do is to create a repository on GitHub.

35
00:02:39,730 --> 00:02:40,780
You don't have one.

36
00:02:40,780 --> 00:02:42,730
These are details instructions.

37
00:02:42,730 --> 00:02:49,660
In order to do that you will have to create to prepare your a local project.

38
00:02:49,660 --> 00:02:52,120
This is when I say local project.

39
00:02:52,120 --> 00:02:56,350
I mean the back end uh application.

40
00:02:56,530 --> 00:03:02,560
And in order to prepare that here we are talking about the git ignore etc. etc..

41
00:03:02,560 --> 00:03:03,220
Okay.

42
00:03:03,460 --> 00:03:06,940
Then you upload your code into GitHub.

43
00:03:08,200 --> 00:03:12,880
Doing this, and then you verify and continue.

44
00:03:12,880 --> 00:03:15,010
Uh, well, you verify with this.

45
00:03:15,040 --> 00:03:15,820
Don't worry.

46
00:03:15,820 --> 00:03:18,910
Just load the code into GitHub.

47
00:03:18,910 --> 00:03:26,320
Then you a are ready to deploy, uh, your back end to render.

48
00:03:26,320 --> 00:03:34,000
And in order to do that here you have some recommendations to prepare the back end application.

49
00:03:34,000 --> 00:03:35,500
Not very important.

50
00:03:35,860 --> 00:03:41,140
Uh, the second step, uh, set up your Postgres database in render.

51
00:03:41,140 --> 00:03:41,980
This is important.

52
00:03:41,980 --> 00:03:44,500
You are going to create the database in render.

53
00:03:44,980 --> 00:03:53,290
Here is how you deploy the back end application which is a via GitHub.

54
00:03:54,080 --> 00:03:55,190
Integration.

55
00:03:55,190 --> 00:04:01,400
And then a you have some notes about maintenance and final considerations.

56
00:04:01,400 --> 00:04:02,480
Don't worry about that.

57
00:04:02,780 --> 00:04:07,250
Then how to add environment variables in render com.

58
00:04:07,340 --> 00:04:10,820
Uh here you have uh how to do it.

59
00:04:12,870 --> 00:04:14,820
And a.

60
00:04:16,250 --> 00:04:18,980
Verify how to verify everything works.

61
00:04:18,980 --> 00:04:19,579
Okay.

62
00:04:19,579 --> 00:04:23,810
The last node important note is how to create the todos table.

63
00:04:24,350 --> 00:04:34,910
So we are going to create the table in the new render database using our terminal okay.

64
00:04:34,910 --> 00:04:45,410
So using the terminal in your computer you are going to access the database you have created in render

65
00:04:45,410 --> 00:04:50,930
com and you are going to create a table there which is going to be the todos table.

66
00:04:50,930 --> 00:04:59,330
So in order to uh connect with the database you have created in render, you will have to do something

67
00:04:59,330 --> 00:05:00,170
like this.

68
00:05:01,180 --> 00:05:08,920
When you created the database, you probably saw one way to address your database.

69
00:05:08,920 --> 00:05:12,010
You are going to do this from your terminal.

70
00:05:12,010 --> 00:05:19,270
But remember you we have to change user password and the database name for the ones you have used.

71
00:05:19,360 --> 00:05:23,410
When you created your database following the previous instructions in render.

72
00:05:23,680 --> 00:05:29,050
Then when you once you enter this command with the proper data.

73
00:05:29,810 --> 00:05:39,320
You are entering Postgres in render, and then you have to enter these instructions to create the table

74
00:05:39,320 --> 00:05:43,490
todos in the Postgres database that is located in render.

75
00:05:43,490 --> 00:05:44,150
Okay.

76
00:05:44,150 --> 00:05:53,570
And with this you are closing the the, the table and the Postgres uh, package there in your terminal.

77
00:05:53,570 --> 00:05:54,140
Okay.

78
00:05:54,860 --> 00:06:02,060
Then you have a some recommendations to verify that the backend, the backend is running correctly,

79
00:06:02,060 --> 00:06:04,970
mostly uh, via the application logs.

80
00:06:04,970 --> 00:06:11,870
So here's, here's how to access the application logs in in in render okay.

81
00:06:13,730 --> 00:06:17,390
And all the other steps here are not very important.

82
00:06:17,390 --> 00:06:18,620
But here you have it.

83
00:06:19,250 --> 00:06:27,560
Okay, so we have, with this, uh, completed the deployment of the backend in render.

84
00:06:27,560 --> 00:06:32,570
Com so a tricky things.

85
00:06:33,820 --> 00:06:35,920
Upload the backend in GitHub.

86
00:06:37,940 --> 00:06:40,550
Create the database in render.

87
00:06:43,530 --> 00:06:48,030
Importing the back end from GitHub into render.

88
00:06:50,280 --> 00:06:54,210
Set the environment variables in render and create the table.

89
00:06:54,540 --> 00:06:55,320
That's it.

90
00:06:55,680 --> 00:07:01,590
Okay, so first time you do it, some of these operations are a little bit weird.

91
00:07:01,590 --> 00:07:06,240
But the second time and the third time you do it are going to be easy and fast.

92
00:07:06,240 --> 00:07:06,600
Okay.

93
00:07:06,600 --> 00:07:10,170
So we only have one step.

94
00:07:10,930 --> 00:07:15,640
A to complete our basic application.

95
00:07:15,640 --> 00:07:21,790
And the next step we have is to deploy the front end on Vercel.

96
00:07:21,820 --> 00:07:27,460
Com so you will see how we do it in the next subsection.

