<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Prasanth KJ - Code Blog]]></title><description><![CDATA[Prasanth KJ - Code Blog]]></description><link>https://hash.prasanthkj.com</link><generator>RSS for Node</generator><lastBuildDate>Sun, 02 Aug 2026 09:20:36 GMT</lastBuildDate><atom:link href="https://hash.prasanthkj.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Using Buddy.Works to Automate React Deployment on Shared Hosting]]></title><description><![CDATA[I use WordPress for many of my projects. While using WordPress, I can opt for any shared hosting, which is much cheaper and easier since I don’t have to build after coding and copy to my server.
However, for a few of my projects, I was using React.js...]]></description><link>https://hash.prasanthkj.com/using-buddyworks-to-automate-react-deployment-on-shared-hosting</link><guid isPermaLink="true">https://hash.prasanthkj.com/using-buddyworks-to-automate-react-deployment-on-shared-hosting</guid><category><![CDATA[#BuddyGit ]]></category><category><![CDATA[Buddy Works]]></category><category><![CDATA[React-deployment]]></category><dc:creator><![CDATA[Prasanth KJ]]></dc:creator><pubDate>Sun, 12 Jan 2025 16:45:42 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1736700366722/f19b7870-032d-47ce-8ad8-afffa982612f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I use WordPress for many of my projects. While using WordPress, I can opt for any shared hosting, which is much cheaper and easier since I don’t have to build after coding and copy to my server.</p>
<p>However, for a few of my projects, I was using React.js, and I couldn’t use AWS or GCP. I wanted to use shared hosting to host this React website.</p>
<p>What I was  doing is coding in my laptop, building the react website locally and uploading the build files into shared hosting. This is tedious as I will modify many times and want to see it live.</p>
<h1 id="heading-can-i-automate-it">Can I Automate it?</h1>
<p>I was thinking to automate it. And to automate it,</p>
<ul>
<li><p>I need the code to be somewhere online. So I use GitHub (which <strong>anyhow I’m doing to store my code</strong>)</p>
</li>
<li><p>It have to build my code</p>
</li>
<li><p>It have to copy my build files into server</p>
</li>
</ul>
<p><strong>I gone through lot of CI/CD services and found</strong> <a target="_blank" href="http://Buddy.Works"><strong>Buddy.Works</strong></a> <strong>suits me very well.</strong></p>
<h1 id="heading-using-buddyworkshttpbuddyworks-for-automating-build-and-copy-files">Using <a target="_blank" href="http://Buddy.Works">Buddy.Works</a> For Automating Build and Copy Files</h1>
<p>I listed the steps here I followed to automate the service.</p>
<ol>
<li><p>Signup buddy.woks</p>
</li>
<li><p>Create a New Project. I named it “prasanthkj.com” (which is my own website)</p>
</li>
<li><p>Click “Actions” and add the actions we need. As I said, I need two steps to be automated.</p>
</li>
<li><p>I will do the coding, and I will push my code to GitHub. So the tool have to identify when I’m pushing my code and start the build and copy it.</p>
</li>
<li><p>For every project, we can create many pipelines for a set of actions to perform.</p>
</li>
<li><p>In my pipeline, first I have to make the setting to run this pipeline, only when git push is detected for my git repo. (Just authenicate buddy.works in your GitHub)</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1736697901200/204bdce6-b572-4c69-840f-abac36a0fef5.png" alt class="image--center mx-auto" /></p>
</li>
</ol>
<p>Note, the trigger. It has to run “On Events” and the event is git push. Yes, this is what I have to set to trigger the pipeline. (And yes, at any time, we can run manually if needed)</p>
<ol start="7">
<li><p>After that, I have to add the necessary actions to perform once it triggered.</p>
</li>
<li><p>After that, I add the necessary actions to perform once it is triggered.</p>
</li>
<li><p>First is to build the react app.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1736698031013/9da1dac4-4127-46b2-980c-fd80d77a5b3e.gif" alt class="image--center mx-auto" /></p>
</li>
</ol>
<p>As seen in the video, just add node js and 2 steps to be there, to install packages and to build it.</p>
<p>Yes, we have a lot of action, we can do from this.</p>
<ol start="11">
<li><p>Next step is copy the build file into my hosting. I created my public_html as ftp folder, which we can do in from cpanel of shared hosting. Copy the ftp and have the username and password, and create the next action.</p>
</li>
<li><p>Select Transfer Files-&gt; SFTP&amp;FTP,</p>
</li>
</ol>
<ul>
<li><p>Set  Target to our ftp site.</p>
</li>
<li><p>Set Source as “Pipeline Filesystem” and Pipeline filesystem path as “/build/” (where we have the build files in React)</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1736698070292/7b2ac82d-bd3f-476b-a3fc-7e77be6668f8.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
<p>And try the connection test and save it.</p>
<ol start="13">
<li><p>As seen in the screenshot, just this is sufficient to do my works, that too in a shared hosting, I can host my React website. That awesome right!</p>
</li>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1736697929100/0b2b433e-4cdb-4485-a899-0db1172726bc.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>That’s it!. Now whenever I push my code from my terminal, within few time (depending on the size of the project), the website will be updated.</p>
</li>
</ol>
<h3 id="heading-so-with-this-buddyworkshttpbuddyworks-cicd-we-can-use-our-shared-hosting-to-have-the-react-website-and-automatically-build-and-have-the-build-files">So, With this <a target="_blank" href="http://Buddy.Works">Buddy.Works</a> CI/CD, we can use our shared hosting to have the React website and automatically build and have the build files.</h3>
<p>I tried some other services also, but this seems very handy and easy to use.</p>
<p>Let me know if it  works for you.</p>
]]></content:encoded></item><item><title><![CDATA[Introduction To Web and HTML]]></title><description><![CDATA[Web

Web is the system of interconnected networks.
Main system which collects and serves the information is called as servers.

Servers

Servers are the computer which was connected to internet 24*7.
Servers has the set of software that can understan...]]></description><link>https://hash.prasanthkj.com/introduction-to-web-and-html</link><guid isPermaLink="true">https://hash.prasanthkj.com/introduction-to-web-and-html</guid><category><![CDATA[iwritecode]]></category><category><![CDATA[HTML]]></category><dc:creator><![CDATA[Prasanth KJ]]></dc:creator><pubDate>Sat, 12 Nov 2022 09:20:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1668244654089/xBFB_NvPG.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-web">Web</h2>
<ul>
<li>Web is the system of interconnected networks.</li>
<li>Main system which collects and serves the information is called as servers.</li>
</ul>
<h2 id="heading-servers">Servers</h2>
<ul>
<li>Servers are the computer which was connected to internet 24*7.</li>
<li>Servers has the set of software that can understand if some other computer requests a certain information and serve that desired information, and also provides securities to the database and other information stored in it.</li>
<li>Most used servers are apache2, Nginix, Microsoft IIS, Open Resty.</li>
</ul>
<h2 id="heading-html">HTML</h2>
<ul>
<li>HyperText Markup Language is the markup language that makes the structured way to  write the document that browser understands and displays in the desired format.</li>
<li>Person who write HTML are called HTML authors</li>
<li>HTML files are saved in .html or .htm<ul>
<li>.htm because in initial days, all file extension are only 3 letters, but later that is not possible and now all servers support .html  or .htm file extensions.</li>
</ul>
</li>
</ul>
<h3 id="heading-indexhtml">index.html</h3>
<ul>
<li>This is the file that most of the servers (even the most famous apache2) look first to start with.</li>
<li>It can also default.html. But somehow all forgot this filename and everyone started with</li>
</ul>
<h3 id="heading-basic-tags">Basic Tags</h3>
<ul>
<li>HTML written in the structured way that the contents will be enclosed within some tags. </li>
<li>Based on what tag we use, browser will display those content in different format</li>
</ul>
<h4 id="heading-h1-tag">H1 tag</h4>
<ul>
<li>using H1 tag will make the content displayed in Heading 1 styling</li>
</ul>
<h4 id="heading-h2-tag">H2 tag</h4>
<ul>
<li>using H2 tag will make the content displayed in Heading 1 styling</li>
</ul>
<h4 id="heading-p-tag">p tag</h4>
<ul>
<li>using p tag will make the content displayed in paragraph styling</li>
</ul>
<h4 id="heading-img">img</h4>
<ul>
<li>img tag can be used to display images stored in the same server or in different network location.</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Create An Extension/Plugin For Firefox and Chrome Browser]]></title><description><![CDATA[Below steps to be followed for creating  Firefox extension

Create a Folder, preferably with the name as the  name  of extension(without space, so that useful for path navigation)
Create  a File "manifest.json" inside the  folder. >touch manifest.jso...]]></description><link>https://hash.prasanthkj.com/create-plugin-for-firefox-and-chrome-browser</link><guid isPermaLink="true">https://hash.prasanthkj.com/create-plugin-for-firefox-and-chrome-browser</guid><category><![CDATA[chrome extension]]></category><category><![CDATA[Firefox]]></category><dc:creator><![CDATA[Prasanth KJ]]></dc:creator><pubDate>Mon, 05 Sep 2022 15:59:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1662393266387/FMUp206vC.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Below steps to be followed for creating  Firefox extension</p>
<ol>
<li>Create a Folder, preferably with the name as the  name  of extension(without space, so that useful for path navigation)</li>
<li>Create  a File "manifest.json" inside the  folder.<pre><code> &gt;touch manifest.json
</code></pre></li>
<li><p>Add below code</p>
<pre><code>{

 <span class="hljs-attr">"manifest_version"</span>: <span class="hljs-number">2</span>,
 <span class="hljs-attr">"name"</span>: <span class="hljs-string">"Borderify"</span>,
 <span class="hljs-attr">"version"</span>: <span class="hljs-string">"1.0"</span>,

 <span class="hljs-attr">"description"</span>: <span class="hljs-string">"Adds a red border to all webpages matching mozilla.org."</span>,

 <span class="hljs-attr">"icons"</span>: {
   <span class="hljs-attr">"48"</span>: <span class="hljs-string">"icons/test.png"</span> 
 },

 <span class="hljs-attr">"content_scripts"</span>: [
   {
     <span class="hljs-attr">"matches"</span>: [<span class="hljs-string">"*://*.github.com/*"</span>], 
     <span class="hljs-attr">"js"</span>: [<span class="hljs-string">"github_test.js"</span>] 
   }
 ]

}
</code></pre></li>
</ol>
<p>Below 3 keys are important, contains meta data of our plugin</p>
<ul>
<li>manifest_version (This is version of this manifest.json file used by the extension)</li>
<li>name (This is our extension name)</li>
<li>version (This is version of the extension)</li>
<li>description is optional (can be upto 132 characters for Firefox and Chrome)</li>
<li>icons is optional<blockquote>
<ul>
<li>key is image size in px, value is the path where we stored the image(48px * 48px is recommended size)</li>
</ul>
</blockquote>
</li>
<li>content_scripts:<blockquote>
<ul>
<li>This will tell Firefox to load a script into Web pages whose URL matches a specific pattern. </li>
</ul>
</blockquote>
</li>
<li>In this case, we're asking Firefox to load a script called "github_test.js" into all HTTP or HTTPS pages served from "github.com" or any of its subdomains.</li>
</ul>
<ol>
<li>Create file  "github_test.js" inside the root directory <pre><code>document.body.style.border <span class="hljs-operator">=</span> <span class="hljs-string">"5px solid red"</span>; <span class="hljs-comment">//This will add red border for  the webpage  we asked to inject this property in content_scripts</span>
</code></pre><ul>
<li>This script will be loaded into the pages that match the pattern given in the content_scripts in manifest.json key. </li>
<li>The script has direct access to the document, like scripts loaded by the page itself.</li>
</ul>
</li>
<li>In Firefox, open "about:debugging"</li>
<li>Select "This Firefox" option in the left pane.</li>
<li>Click "Load Temporary Add-on" button.</li>
<li>Select the manifest.json file of your project</li>
<li>Now  the extension will be installed in your Firefox browser.</li>
<li>To load the plugin in Google  chrome, navigate to "chrome://extensions/", toggle to Developer Mode, and select the plugin folder.</li>
</ol>
]]></content:encoded></item></channel></rss>