CORS Anywhere Installation on Heroku

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome guys and uh in this video i'm going to show you how to host your own instance of course anywhere so cos is a mechanism for like to share resources online so i hope if you're watching this video then you already know what course is i'm going to show you how to host your own instance of course anywhere so without further ado let's get started so first of all what we are going to do is you are going to install git on your computer so if you if you haven't yet installed it so you download the the version like which suits your operating system and so when you download the git installer then you're going to install it so you're going to install it so so you can create a an icon on the desktop if you want to change your your editor your git editor you can do so right here so use notepad plus plus so the installation process will go on right away so it should take very few minutes to the install for the installation to complete so the installation is done and uh so we are going to click on finish and so to verify that it is installed so you're going to open your command line and type git firing so you love to see the git version you have installed so that shows that git is installed so we are going to close that so you're going to you you're going to create a folder and a new folder so can be any folder so what i'm going to do is i'm going to open visual studio code you can use any other editor you have so and i'm going to open terminal the terminal in this so make sure that you have the terminal opened in your new folder like you can go to use you can just use your command line and use cd and open the folder you have just created so yeah what we're going to do is we're going to clone the course anywhere repository from github so let me just show you the commands we are going to be following so we are going to clone the github repo with this command here so you're going up like type it then your command line and then you paste you type enter so the cloning process will start and so it's done so when you go back in in the folder you created so you will see this course anywhere folder created with the different files inside it so we are going to type cd and then cause like to enter that folder we have just created so there we are just clean that up so after entering into the the folder we have just the the the course anywhere repo then what we are going to do is so after cloning then what we are going to do is uh we are going to go head to heroku and create an account so if you don't have an account on your roku you'll have to first sign up for an account so i already have also just login so i've finished logging in then so after getting an account on heroku what you're going to do you're going to download the hiroko cli so you're going to choose your operating system and use i'll just 64-bit installer for windows so after downloading then what you're going to do you're going to install heroku installer as any other normal program click next then install so the installation is done so you're going to close so we're going to go back to our editor and so in the same folder we okay we clone the course anywhere folder here what we are going to do is we are going to make sure that time you know we are in that same fold and then so we are going to login in on hiroku so we are going to type hiroku login this command right here so make sure you have you have one internet connection so they'll tell you to press any key on your keyboard to log in so press any key on the keyboard and you'll be there directed to your browser to login so you're going to click on login so what when it shows logged in then when you head back to your terminal then you'll see logged in so after logging in then what you're going to do next is we're going to create our proxy app on hiroku using this command right here so you're going to use this so this this is the name of the app you can change it to your liking so i'll copy that and then paste it and click enter so i'll just have to edit this to contain only lowercase letters so this name is already taken so i will edit it so i've created that up so when you head back to hiroku yohiroku account you should be able when you refresh your apps you should be able to see a new app you have just created so it's right here so it has just been created then after creating the app what we are going to do we are going to to first set the the limits the request limits of the hub of the app we are going to create so we are going to set 60 requests like hiroku to accept only 60 requests per minute so we are going to set that using this command here oh so what i forgot is to edit this so this name the new name we have just changed should correspond to this name right here so it should be something like this then you you head back to your terminal and then you set that so so they have set the limit so after that then what we are going to do we are going to push the the the proxy we have just cloned to github so we are going to do that with that last command so done like it's done uploading the pushing the the the course proxy we just cloned to hiroku so when you head back to your heroku account when you hover your cast on next to that app you will see that the scene up is a week so you can also hit click on the app and then go to view logs so when you check the last log it shows that state change from state change from starting to up so that means that the app is the proxy is up and running so what we are going to do next is uh we are going to test if the proxy is up and running so i created a simple html file whereby it gets ranks rank the ranking from ranking.com website so ranking.com website and so what it does is that it gets data from this website and displays it in the console so let me test it so when i click this button it should display information it fetches from that link in this console right here so when i click on the pattern so they're showing me like no access control allow all origin so that the course error is being displayed so to so what i'm going to do is i'm going to add this the proxy i've just hosted on to this link in the test test file right here so i'm going to head back to to the to hiroko and then under settings of that app the prox have just hosted then scroll down to um the domains and the domains so your app can be found at least so copy that link and then what you're going to do is you're going to paste it at the start of the address you want to where the you are facing the course problem so something like this so this is the address and then you add on the address you want to fetch data from so after that then i can go back to test so when i refresh this and then press the button again wait for it to fit so you're seeing that it's fetching data from that address without any course error being displayed so that's it guys i hope this video worked for you if it worked for you don't forget to like the video and also subscribe for more videos cheers
Info
Channel: Tricks Gum
Views: 2,641
Rating: 4.6666665 out of 5
Keywords: tricksgum
Id: zoOx1b9iBRk
Channel Id: undefined
Length: 12min 24sec (744 seconds)
Published: Wed Dec 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.