How to add password on a simple page?

How do I add a simple password that is inside .env?
Basically, I just need 1 page to have a password.

When you open a specific page, an alert will come out and you have to put a password to access the page.

You setup your project to have an api endpoint which check to see if the input was correct. You would need to open and XMLRequest to your server and handle the response on your client side.

Can’t do it on the glitch project? Because right now, I only have the basic hello world project.