URLShortener simplifies URL management with an intuitive interface and efficient backend. Built with Flask and MongoDB, it offers a seamless experience for shortening URLs.
I connect to mongodb by connection url and paste it into .env file.
I also generate a secret key and place it in .env file.
Then I make an account on Google Developers Console where I set up OAuth consent screen and get Google client Id, secret and redirect url and place those on .env file.
Then in app.py file, I fetch the variables from the .env file and set the routes - /login/google and /authorize/google.
Then in index.html file, I create a "Login with Google" button.
In stats.html file, I make the template say Hello userId.