Okay, so we just completed the part three, which as you saw, is a very easy, uh, part of this process.
And we are going now to the part four, uh, in order to deploy the back end on render.
Com, these are the steps we are going to cover.
And you will see that these steps are super well explained in the notebook here on the right.
So the first thing is we are going to upload a the back end to GitHub.
And we will show you how to do that.
If you are not familiar with GitHub then you will create a free account on render.com.
A and then you will create the database in render.
Com because if you remember the database we were using is a database we have in our computer.
So we need to put the database in the cloud.
And we will do this in render a.
And after we create the database remember we need to create the table which is the one of the last things
we are going to do here in this list.
So a we will create a web service on the render.
Render com is super easy.
We will import the backend from GitHub.
We will include the environment variables because remember our dot env file is not going to GitHub.
We are prevented it with the we are preventing it with the dot.
Gitignore file.
Remember.
So we will need to enter the environment variables in render.com.
We will create a table and then we will confirm that everything works fine.
Okay.
Then here in the right, you have all the instructions.
I am very confident that this will be like that, uh, for many months.
But, you know, sometimes platforms, frameworks change and some of these steps can change.
Don't worry about it.
If you have any trouble during this process, you know where to go.
You have the render.com documentation, you have chat, GPT four, etc. etc. etc. but this process a
should be.
You see, for you, the first time is a little bit, uh.
Well, some things can be can be a little bit cumbersome for you, but I think the second or third time
you do this is going to be a fairly easy and fast for you.
So the first thing you need to do is to create a repository on GitHub.
You don't have one.
These are details instructions.
In order to do that you will have to create to prepare your a local project.
This is when I say local project.
I mean the back end uh application.
And in order to prepare that here we are talking about the git ignore etc. etc..
Okay.
Then you upload your code into GitHub.
Doing this, and then you verify and continue.
Uh, well, you verify with this.
Don't worry.
Just load the code into GitHub.
Then you a are ready to deploy, uh, your back end to render.
And in order to do that here you have some recommendations to prepare the back end application.
Not very important.
Uh, the second step, uh, set up your Postgres database in render.
This is important.
You are going to create the database in render.
Here is how you deploy the back end application which is a via GitHub.
Integration.
And then a you have some notes about maintenance and final considerations.
Don't worry about that.
Then how to add environment variables in render com.
Uh here you have uh how to do it.
And a.
Verify how to verify everything works.
Okay.
The last node important note is how to create the todos table.
So we are going to create the table in the new render database using our terminal okay.
So using the terminal in your computer you are going to access the database you have created in render
com and you are going to create a table there which is going to be the todos table.
So in order to uh connect with the database you have created in render, you will have to do something
like this.
When you created the database, you probably saw one way to address your database.
You are going to do this from your terminal.
But remember you we have to change user password and the database name for the ones you have used.
When you created your database following the previous instructions in render.
Then when you once you enter this command with the proper data.
You are entering Postgres in render, and then you have to enter these instructions to create the table
todos in the Postgres database that is located in render.
Okay.
And with this you are closing the the, the table and the Postgres uh, package there in your terminal.
Okay.
Then you have a some recommendations to verify that the backend, the backend is running correctly,
mostly uh, via the application logs.
So here's, here's how to access the application logs in in in render okay.
And all the other steps here are not very important.
But here you have it.
Okay, so we have, with this, uh, completed the deployment of the backend in render.
Com so a tricky things.
Upload the backend in GitHub.
Create the database in render.
Importing the back end from GitHub into render.
Set the environment variables in render and create the table.
That's it.
Okay, so first time you do it, some of these operations are a little bit weird.
But the second time and the third time you do it are going to be easy and fast.
Okay.
So we only have one step.
A to complete our basic application.
And the next step we have is to deploy the front end on Vercel.
Com so you will see how we do it in the next subsection.