Running a website such as Gigtodoscript requires a lot of interaction among users of the platform. More often than not, many server specs could not handle effective delivery of messages within the platform and to the user mails. We have integrated websockets to enhance swift deliverability of messages and general improvement in the chat platform.
In this guide, we have shown you simple steps to create a websockets address for your online site.
Step 1: From Heroku.com, click right side icon which says “new” and from the popup menus, click “create new App”.
Step 2: In the popup form, enter name for your APP (must be lowercase letters) and hit save. I am using gigtodo as my unique username. You can also use your business name as App name as you wish
Step 3: Now it is time to choose deployment method. Remember, we cannot deploy without creating a repository first. To do that we will choose “connect to github”. Choosing this method will let you enter a repository name (repo-name).
…………We will come back to step 3 in just a moment……………….
Step 5: While logged-in, click the plus ➕ icon and select “create a repository”
Step 6: Now enter repository name. (Preferably, it must be same as App name created in Heroku so we will use gigtodo)
Step 7: In next step on the same page, “public” repository is checked by default. Switch to “private”
Step 8: Next thing to do is to initialize this repository so we will check “Add a readme file” and click “create repository” button. This will open a new page where you will add files.
Step 9: On this page, you will select “Add file” menu and go after “Upload file” (see folder in the link below). [Important-extract the files first]. After uploading these three files extracted, hit “commit changes” button to save.
Remember the repository name format on top left of above page == username/repository-name eg, Kateygh/gigtodo. All we needed was the repository name (ex. gigtodo) so let’s go back to Heroku.com and continue from where we stopped (under step 4)
Step 9: In repo-name section, enter your repository name created from github and click “search” button. The next option will popup so click “connect” and your Heroku App will connect to github repository.
Step 10: Scroll down to where it says “Deploy a Github Branch”. The Branch is “Main” by default so we will only click “deploy Brach button for codes to run. After code runs, click view and you will see web address. Copy and paste this address in your website admin Panel and save
After deploying branch, you will see a button to view address. Address will look like this: Wss://gigtodo.herokuapp.com
If you are using unique name including websockets, Address will look like this: Wss://gigtodo-websockets.herokuapp.com
Step 11: From your website admin panel under settings =>general-settings, switch ON websockets and paste the full address