Are everyone in this video, I will show you how we can separate this thing into the environment variable.
And also I want to separate it into the environment variable.
So how to do that?
Well, in Next.js we can create a file called file and we can boost the port right here.
For example I will port 5000.
And inside the main dot CSS I will look up into that.
Let's say one or not.
Now if I run the project and I will refresh it to the top 5000.
Unfortunately, it did not work at all.
Why?
The reason?
Because right here with seven configuration, there are eight we get.
So for that reason is a documentation.
We need to load the technique and click on configuration.
In here only we need to install the package right here.
Okay.
In under the hood it will use the dot in way.
If you are familiar with us.
Let me install.
And now let's show you how we can use.
It again to install this fully auto configuration.
Now in Wi-Fi we should import the config module right here inside the app module.
Let me just.
Open the app module.
And here we will put that on top of the module module.
And we will invoke the config module.
So right now after that let's say it works or not.
Well right now after we got this it will work.
And.
Right here.
If we scroll down a little bit, user is global.
Well, whenever we want to use the config module in the other module.
First of all we have to use our.
We have a boss.
We have a message.
Okay.
If we need to we use the config module.
We should invoke it inside the user module or other module.
So I don't want us at all for a reason.
I want it will mark the config module.
Right here will be the global.
And in the in any module we know the need to invoke us okay.
So for that reason in this guy we would the option is global.
So we go okay That will help a lot.
And right now, let's see how we can.
Separate this thing into the another.
Let me cut that.
It is an individual here I will move the Google URL.
Okay.
Move.
Maybe the URL.
And inside here I will go to.
The URL.
And I will mostly click right here and let's say.
So here it will not work.
Because I.
Okay.
Let me stop and go.
Over.
It's already worked.
But in that case, we usually not want to do the process.
If we instead of we want to configure it using the module.
Okay.
Let's go look outside inside the modules and click on async configuration.
And right here we'll scroll down a little bit in here.
Inside the module we can use the four routes are same okay.
You can say in here is here we use the four route with the forward assist we can inject no dependency
injection after config module.
Okay, inside here we will import entire module and we will use the new factory.
And we will inject the config service right here.
And inside the width we can get directly the module URL.
Okay so let me complete everything and I will boost I will replace it okay.
And we import service.
And right here replace with that.
And right here.
Inside we must.
New arrival or not, I will remove.
That is totally okay.
And right here I will use it for you.
I'll say okay.
Right here.
It's already work and.
You might think this very confusing.
Okay.
You might think this very confusing, but let me explain it fully.
We don't need to memorize all the important points in this line right here.
We wish the import and inject.
Well, you can say inside the folder, as if we have to use factory methods.
Right.
And the factory methods belong to that object.
It will belong to another of mahjong.
In order to use a complete survey, we need to inject us, right?
And in order to inject that, we must import us also.
So in order to use the survey results in darkness and in progress.
After that we can look at us and right here okay we notice but the dependency injection.
Okay.
We will inject it over here and yield us.
So that is and of course you don't need to memorize anything even with my eyes will not.
Memorize all of that okay.
That is not for the video.
I will see you.