Now, the last step in order for us to deploy our portfolio website is to go to the configuration file
right here.
When we click on this, you'll get a whole bunch of text and we can actually delete a ton of these things.
You'll see over here that you can have things set up based on what framework you use like flask.
So because we're using Flask, let's remove all of this code.
Just have the flask section.
And we'll remove the comments.
So we have import sis.
And it has some description here that you can read on your own.
But the key thing that we want.
Is to remove the comments from here.
Just like that.
And then we want to make sure that the directory.
So Andre.
Has a path.
To.
Portfolio.
So remember our directory was home username and then the name of our project.
Next we want to make sure that we give the name.
As the name of our file.
So in my case it was server pie.
If you remember, I have server dot pie right over here and we're exporting it as app.
So the app is the variable and server is the file name.
So if you have a different file name, let's say you have run py then you would put run here.
So let's do server.
Let's see it save.
And let's go back to the Web.
If I reload.
And run this, we get an error.
Now, an interesting feature of Python anywhere is that we can actually look at the logs.
So over here, the log files, we can see what errors or what the server is logging.
So in our case, let's look at the errors module not found error.
No module named server.
All right.
That's interesting.
Let's see why that might be.
So if we go back to our configuration file.
The reason that we got the error was well, because I misspelt the path so it couldn't find the server.
So port fo.
If I save this, go back to Web.
Reload and click on our website.
Holy moly.
We have our portfolio project live.
That link over there I can share with anybody and they could see it on their computer if they're halfway
across the world, let's say in India.
Yep.
They can see my portfolio.
But you want to know what the coolest part is?
Well, the fact that all of our pages work, but also our contact form.
So if I do something like let's make this a little bit bigger so you can see are two dot com some subject
line and then.
Oh, somebody's super, super excited.
If I hit send.
That worked.
And the cool part is that next time, let's say somebody contacted you.
All you have to do.
Is actually go back to Python anywhere.
So let's go to a new page of Python anywhere.
Going to the files.
And then check out the database CSV and look at that.
You have a new entry into your CSV file and I can even save the file.
I can download the file so that later on, a week from now, I can check up on the progress and see
how my portfolio is doing.
And now I hope you start to see the power that comes with this.
We've created an entire Web platform ourselves.
We've created the HTML, CSS and JavaScript files while we use some templates, but we still modified
them to our liking and you can continue to update them and change them to your liking.
But we also created a server ourselves that also contains a CSV file that will be saved on this machine.
And we move that machine from just our computers to someplace like Python, anywhere that has a dedicated
server or a server space for us so that it's always running.
And this is how things like databases and places like AWS, Google Cloud, Azure and any other database
or server platform works.
They allow you to use their machine.
They make sure that they're going to run fast, that they're always going to be on.
And databases allow you to save things.
So instead of saving items in a CSV, we can save it into a dedicated database so we can do more operations
or we can store more information.
But I hope that opens up the world of web development to you and how everything is connected.
In just a few hours, we're able to create a pretty neat looking portfolio.
Right?
I mean, yeah, there was some configuration, some issues, but now that you know how to do it, I
bet you see a whole lot of possibilities of what you can do.
You can now customize this site whichever way you want.
Maybe you learn a little bit more HTML or CSS to make the website a little bit more to your liking.
Maybe you want to add some JavaScript to make it even more interactive.
Or maybe you want to explore different things like perhaps hosting this application and some place other
than Python anywhere, or maybe creating your own database.
The possibilities are endless.
So I hope this was exciting to you.
This is one of my favorite topics and it was a lot of things that we covered in a short amount of time.
You're not going to be an expert web developer just from a few videos, but I hope this at least shows
you the world of web development and how you might want to be involved in this world.
Good job getting this far.
This was a really tough section.
If your brain hurts, don't worry.
Go take a nap and I'll see you in the next video.
Bye bye.