<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tech Elucidator on Medium]]></title>
        <description><![CDATA[Stories by Tech Elucidator on Medium]]></description>
        <link>https://medium.com/@techelucidator?source=rss-e01e58bb3850------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bxh5_plsgOPMhPhtl1_KQw.jpeg</url>
            <title>Stories by Tech Elucidator on Medium</title>
            <link>https://medium.com/@techelucidator?source=rss-e01e58bb3850------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 13:57:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@techelucidator/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What is Kubernetes?]]></title>
            <link>https://techelucidator.medium.com/what-is-kubernetes-2faf46794483?source=rss-e01e58bb3850------2</link>
            <guid isPermaLink="false">https://medium.com/p/2faf46794483</guid>
            <category><![CDATA[container-orchestration]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Tech Elucidator]]></dc:creator>
            <pubDate>Fri, 06 Jan 2023 17:48:50 GMT</pubDate>
            <atom:updated>2023-01-06T17:55:15.726Z</atom:updated>
            <content:encoded><![CDATA[<p>Kubernetes is an Open Source container orchestration framework for automating the deployment, scaling and managing of containerised applications in different environments like a physical machine, virtual machine, cloud environment or even hybrid. It was developed by Google and released as open-source in 2014.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*dIBkOqP6aLzJHK_9AWe-Tg.png" /></figure><h4>What problem does Kubernetes solve?</h4><p>As the trend slowly raised from moving to microservices in 2012, there were usages of containers. The containers provide a perfect host for small independent applications like microservices. The rise in containers and microservices resulted in applications having hundreds of containers. Managing containers across various environments using some scripts or self-made tools is a pain that sometimes is impossible. This situation demands the need for a container orchestration tool.</p><h4>What features does the container orchestration tool offer?</h4><ul><li>High Availablity: The application has no downtime i.e. the users can always access the applications.</li><li>Scalability: The application has high performance i.e it loads fast, and users have fast response rates from the applications.</li><li>Disaster Recovery: The infrastructure has some mechanism to back up and restores the data when some disaster occurs, so after recovery, the application runs from the latest data ensuring there is no data loss.</li></ul><p>In simple words, Kubernetes is a new man to manage your containers of microservices.</p><p>Kubernetes also called K8s as an abbreviation results from counting the eight letters between the “K” and the “s”.</p><p>In the next blog, we shall discuss some Main K8s Components.</p><p><em>Until the Next Blog, Happy Reading!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2faf46794483" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Tutorial for Beginners]]></title>
            <link>https://techelucidator.medium.com/kubernetes-tutorial-for-beginners-656f271a3479?source=rss-e01e58bb3850------2</link>
            <guid isPermaLink="false">https://medium.com/p/656f271a3479</guid>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[k8s-series]]></category>
            <category><![CDATA[simple]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Tech Elucidator]]></dc:creator>
            <pubDate>Mon, 02 Jan 2023 14:21:02 GMT</pubDate>
            <atom:updated>2023-01-02T14:21:02.173Z</atom:updated>
            <content:encoded><![CDATA[<p>As the topic says, this will be a series of blogs or tutorials meant to transform you into a hotshot in Kubernetes(also known as K8s).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gx-iKXS8tJnj0_35" /><figcaption>Photo by <a href="https://unsplash.com/es/@instalook?utm_source=medium&amp;utm_medium=referral">Danila Hamsterman</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Let’s quickly go through the things on the plate,</p><p>This tutorial is split into Basics and Advanced Concepts. Basic concepts help you get basic knowledge and exposure to the basic things you need to know about Kubernetes, while Advanced Concepts explain important concepts over Kubernetes. Let’s see what all are waiting for us,</p><blockquote>Basic Concepts / Intro to K8s</blockquote><ul><li><strong>What is Kubernetes</strong>: This gives you a great introduction to Kubernetes. We will start with a basic understanding of what is Kubernetes and what problems it solves in the real world.</li><li><strong>K8s Architecture</strong></li><li><strong>Main K8s Components</strong>: This details how you can use Kubernetes by detailing all the main components of Kubernetes.</li><li><strong>MiniKube and Kubectl - Local setup</strong>: After learning the main components, we will learn and install minikube for the local Kubernetes cluster.</li><li><strong>Main Kubectl commands - K8s CLI</strong>: Details up for creating, debugging and deleting pods of kubectl( which is a Kubernetes CLI)</li><li><strong>K8s Yaml Configuration File</strong>: This explains the configuration of the Kubernetes YAML file used to create and configure components.</li><li><strong>Hands-On Demo</strong>: we will use a practical use case to deploy a simple application setup in the Kubernetes cluster locally to get hands-on experience and confidence in Kubernetes.</li></ul><blockquote>Advanced Concepts</blockquote><ul><li><strong>K8s Namespace - Organise your Components</strong></li><li><strong>K8s Ingress</strong>: How to make your application available from outside using ingress</li><li><strong>Helm - Package Manager</strong>.</li><li><strong>Volumes - Persisting Data in K8s</strong>: Explore using volumes to process data in Kubernetes.</li><li><strong>K8s StatefulSet - Deploying Stateful Apps</strong>: How to deploy stateful applications like databases with StatefulSet components.</li><li><strong>K8s Service</strong>: Context on different Kubernetes services for various use cases.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*dIBkOqP6aLzJHK_9AWe-Tg.png" /></figure><p>I hope the above things would have provided us with enough context about what this Kubernetes series is all about.</p><p>I want to keep this blog short so that this will be useful for those who want to keep the concepts handy.</p><p>Note: The first series of blogs will be kind of theory-oriented to get to know what it is and we shall do some hands-on to get a deeper understanding of how it works.</p><p>Watch this section for hyperlinks to consecutive blogs once they get published.</p><p><em>Until the Next Blog, Happy Reading!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=656f271a3479" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to setup Tomcat to support HTTPS or SSL]]></title>
            <link>https://techelucidator.medium.com/how-to-setup-tomcat-to-support-https-or-ssl-bfab74f22ed0?source=rss-e01e58bb3850------2</link>
            <guid isPermaLink="false">https://medium.com/p/bfab74f22ed0</guid>
            <category><![CDATA[apache-tomcat]]></category>
            <category><![CDATA[https]]></category>
            <dc:creator><![CDATA[Tech Elucidator]]></dc:creator>
            <pubDate>Tue, 23 Nov 2021 14:03:20 GMT</pubDate>
            <atom:updated>2022-08-31T08:01:37.663Z</atom:updated>
            <content:encoded><![CDATA[<p>In just three easy steps!!!…wait what?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SN5ilXtu1BjxnSue" /><figcaption>Photo by <a href="https://unsplash.com/@franckinjapan?utm_source=medium&amp;utm_medium=referral">Franck</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><a href="https://www.google.com/search?q=how+to+ensure+that+i+have+jdk+installed&amp;oq=how+to+ensure+that+i+have+jdk+installed&amp;aqs=chrome..69i57.8965j0j7&amp;sourceid=chrome&amp;ie=UTF-8">Ensure</a> that you have <a href="https://www.google.com/search?q=how+to+install+jdk&amp;oq=how+to+install+jdk&amp;aqs=chrome..69i57j69i59j0l3j69i60l3.5330j0j9&amp;sourceid=chrome&amp;ie=UTF-8">JDK installed</a> and <a href="https://tomcat.apache.org/download-90.cgi">tomcat archive</a> file</p><p>A keystore file stores cryptographic keys or certificates in the binary Java Key Store (JKS) format. A KEYSTORE file is used for several security purposes Since it contains valuable data, the file is encrypted and protected by a password to secure the file.</p><p><strong>1.</strong> Open your command prompt:</p><p><em>For Windows users:</em> press windows + r and type cmd and press enter.</p><p><em>For ubuntu users :</em> press ctrl + alt + t</p><p><strong>2.</strong> Navigate to the directory where you have installed JDK, the default location will be</p><p><em>For Windows users: </em><strong>cd %JAVA_HOME%/bin</strong></p><p>it will work if the JAVA_HOME environmental variable has been set properly else go with this</p><p><strong>cd</strong> <strong>C:/Program Files/java/jdk&lt;version&gt;/bin/</strong></p><p><em>For Ubuntu users :</em> <strong>cd /usr/lib/jvm/java&lt;type and version&gt;/bin</strong></p><p><strong>3.</strong> To generate keystore file execute the following command,</p><pre>keytool -genkey -alias tomcat -keyalg RSA</pre><p>after executing the above command it will ask for a password in order to provide security. So provide a password and ensure that you remember it since we need it in the second step. After that, it asks for some basic information like name organization etc... you can also fill with Xyz nothing matters.</p><p>Now the ‘.keystore’ file will be generated in</p><p><em>For Windows users:</em> C:/Users/&lt;username&gt;/.keystore</p><ol><li>Open server.xml file which will be present in <strong>apache-tomcat-&lt;version&gt;/conf/</strong> folder</li><li>Replace the below code</li></ol><p><em>For Ubuntu users: </em>execute <strong>cd</strong> in command prompt then execute <strong>pwd </strong>it will show the current path, the file is present in <strong>&lt;current_path&gt;</strong>(got by executing above steps)<strong>/.keystore, </strong>the path will look like /home/local/&lt;username&gt;/.keystore</p><p>with</p><pre>&lt;Connector SSLEnabled=&quot;true&quot; acceptCount=&quot;100&quot; clientAuth=&quot;false&quot;<br> disableUploadTimeout=&quot;true&quot; enableLookups=&quot;false&quot; maxThreads=&quot;25&quot;<br> port=&quot;8443&quot; keystoreFile=&quot;&lt;keystore_filepath&gt;/.keystore&quot; keystorePass=&quot;&lt;password_of_the_.keystore_file&gt;&quot;<br> protocol=&quot;org.apache.coyote.http11.Http11NioProtocol&quot; scheme=&quot;https&quot;<br> secure=&quot;true&quot; sslProtocol=&quot;TLS&quot; /&gt;</pre><p>replace the &lt;keystore_filepath&gt; with your files path and &lt;password_of_the_.keystore_filepath&gt; with the password of that file. Now save the server.xml and restart the tomcat</p><p><em>For Ubuntu users: run </em><strong><em>./shutdown.sh </em></strong><em>after executing this run by typing this command in cmd and pressing enter if it doesn&#39;t works run in order to make a file executable</em></p><p><em>For Windows users: </em>run <strong>shutdown.bat </strong>after executing this run <strong>startup.bat </strong>by double clicking on this file.</p><p>shutdown.&lt;sh/bat&gt; and startup.&lt;sh/bat&gt; files are found in <strong>apache&lt;version&gt;/bin</strong> folder</p><p>after restarting open any browser and connect to tomcat by <a href="https://localhost:8443/">https://localhost:8443</a> .. hurray!! your server starts accepting HTTPS request</p><p>Paste the below code in the web.xml file in your web application</p><p>now save the web.xml and restart tomcat and access your web application by <a href="https://localhost:8443.">https://localhost:8443.</a></p><p>Hurray!!.. Your web application is now more secure...</p><p>Thanks for your patience to read my blog... Kindly do clap and comment to ensure that you are benefitted from this…</p><p>Have a great day.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bfab74f22ed0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create a simple web application in python using flask]]></title>
            <link>https://techelucidator.medium.com/how-to-create-a-simple-web-application-in-python-using-flask-c0672cb1ee3e?source=rss-e01e58bb3850------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0672cb1ee3e</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[python-flask]]></category>
            <category><![CDATA[flask-framework]]></category>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[python-programming]]></category>
            <dc:creator><![CDATA[Tech Elucidator]]></dc:creator>
            <pubDate>Sat, 24 Oct 2020 08:52:05 GMT</pubDate>
            <atom:updated>2022-08-31T07:44:17.286Z</atom:updated>
            <content:encoded><![CDATA[<p>A web application framework is written in python</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DYkTg5Gz63jDd7K-.jpeg" /><figcaption>pic source <a href="https://www.fullstackpython.com/img/pages/flask-python-fsp.jpg">here</a></figcaption></figure><p>In this blog we are not going to dive deep into the flask, we are just gonna see what is it then we will be setting up the environment and we are gonna have a simple hands-on experience on the flask.</p><p>Flask is a popular Python web framework. It is a third-party Python library used for developing web applications in python. It is quite simple and easier to start though you are a beginner.</p><p><strong>Step — 1: Installing the components from the ubuntu repository</strong></p><p>Let’s update the local package index and install the package that will allow us to build our python environment.</p><pre>sudo apt update sudo apt install python3-pip python3-dev build-essential libssl-dev libffi-dev python3-setuptools</pre><p><strong>Step- 2: Creating a python virtual environment:</strong></p><p>Let’s set up a virtual environment in order to isolate our Flask application from the other Python files on the system.</p><pre>sudo apt install python3-venv</pre><p>Now, create and move into a directory where you will have the flask project</p><blockquote><em>before executing below commands replace &lt;directory_name&gt;, &lt;virtual_environment_name&gt; and &lt;filename&gt; with the names that you wish.</em></blockquote><p>Now, create a python virtual environment to store the project’s python requirement</p><pre>python3 -m venv &lt;virutal_environment_name&gt;</pre><p>We need to activate the virtual environment before installing the flask</p><pre>source &lt;virtual_environment_name&gt;/bin/activate</pre><p><strong>Step — 3: Setting up a Flask application:</strong></p><p>Let’s install ‘ <em>wheel’ </em>with the local instance of pip so that our package will be installed even if they are missing wheel archives.</p><pre>pip install wheel</pre><p>Now, let’s install Flask and Gunicorn</p><pre>pip install gunicorn flask</pre><p>Create a simple file with the extension ‘.py’, for example &lt;filename&gt;.py with the below code in it.</p><pre>from flask import Flaskif __name__ == &quot;__main__&quot;:<br>app = Flask(__name__) <a href="http://twitter.com/app">@app</a>.route(&quot;/&quot;)<br> app.run(host=&#39;0.0.0.0&#39;,port=7070) <br>def hello():<br> return &quot;&lt;h1&gt;Simple Flask Application&lt;/h1&gt;&quot;</pre><p>We need to allow access through port 7070(which I have specified) through the UFW firewall</p><pre>sudo ufw allow 7070</pre><p>Now test the application by</p><p>you can see the below output</p><pre>* Serving Flask app &quot;app&quot; (lazy loading)<br>* Environment: production<br> WARNING: This is a development server. Do not use it in a production deployment.<br>Use a production WSGI server instead.<br>* Debug mode: off<br>* Running on <a href="http://0.0.0.0:7070/">http://0.0.0.0:7070/</a> (Press CTRL+C to quit)</pre><p>visit your server by the URL <a href="http://localhost:7070/">http://localhost:7070</a> if you are accessing in the same machine else access it by http://&lt;ipaddress&gt;:7070</p><p>okay, guys, that’s it we have created a simple web application using flask😇😊</p><p>Thank you so much for spending your valuable time on my blog. Please support me by doing claps at the rate of 1–50 by the way you feel it is worth it. If you have any doubts regarding this blog or suggestions to improve it please do comment below and share it with those who want to know about a web application framework in python.</p><p>I will get you things as simple so my other blogs about</p><ol><li>PWA — deploy app at any environment is <a href="https://techelucidator.medium.com/ever-wondered-about-deploying-an-application-with-0mb-in-all-environments-f48628ee2185">here</a></li><li>Chrome extension is <a href="https://techelucidator.medium.com/how-to-build-my-first-chrome-extension-55d6f36ed49e">here</a></li></ol><p>Do read, enjoy and provide support💪💪🙏</p><p>Have a good day :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0672cb1ee3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to build my first Chrome Extension.]]></title>
            <link>https://techelucidator.medium.com/how-to-build-my-first-chrome-extension-55d6f36ed49e?source=rss-e01e58bb3850------2</link>
            <guid isPermaLink="false">https://medium.com/p/55d6f36ed49e</guid>
            <category><![CDATA[browser-extension]]></category>
            <category><![CDATA[chrome-extension]]></category>
            <category><![CDATA[chrome]]></category>
            <category><![CDATA[gｏｏｇｌｅ]]></category>
            <dc:creator><![CDATA[Tech Elucidator]]></dc:creator>
            <pubDate>Sat, 11 Jul 2020 10:44:28 GMT</pubDate>
            <atom:updated>2022-08-31T07:40:17.206Z</atom:updated>
            <content:encoded><![CDATA[<h3>Ready to COMMAND your chrome to do what you wish: Build Chrome Extension.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WHqG_XlEs80E9vbL.png" /></figure><p>Chrome with a customized extension</p><p>Hey enthusiastic, imagine a situation where you and two of your close friends (say A and B) are chit-chatting in your favourite place that you ever admired after some time you gave them a task i.e. you gave them a cuboid wooden block that they cannot lift and ask them to cross about 10km with that wooden block, in that case, they can only pull/push it to 10km and one who crosses first will earn 500$.</p><p>Now listen carefully… A will start to pull/push the wooden block as soon as the whistle blows while B is an intelligent one, took a saw and starts carving the wooden block from cuboid to sphere after some time A had covered 3km B is starting from 0 with a spherical wooden block but I am sure A will be very tired but B will just kick off the wooden block and run behind it(he is doing his job in an effective manner) hence the B will reach endpoint soon and claim 500$ while A is in 5Km.</p><p>Now compare.. the wooden block(that you gave your friend) is Chrome (i.e GOOGLE has given chrome to everyone). the saw(B used) is extensions (people like B use) by using customized extension people works very fast, save lots of time and achieve more… THAT’S WHAT A EXTENSION LADIES AND GENTLEMAN...</p><p>Now let&#39;s build a chrome extension that says hi to you in just <strong>two</strong> steps:</p><ol><li>Develop an extension.</li><li>Deploy it to chrome.</li></ol><p>Let&#39;s create our project structure as shown below. Start by creating a root directory with the name <strong>First_Chrome_Extension</strong> we will put all our files in this directory since Chrome allows us to load up a plugin by pointing it at a folder that contains the extension files.</p><p>Ensure your project structure looks alike</p><p><strong>extension.html:</strong> This file is used to place the contents that we need.</p><p><strong>extension.css: </strong>This file is used to design how the contents should look.</p><p><strong>extension.js: </strong>This file is used to decide which action to be performed when some event occurs.</p><p><strong>manifest.json: </strong>I have mentioned the use of this in my previous blog take a look at it. click <a href="https://medium.com/@ananthkrish1998/ever-wondered-deploying-an-application-with-0mb-at-all-environment-ios-android-windows-etc-4a7a73f9249?source=friends_link&amp;sk=38ad8c73194cf4e8866990d57f99e4f6#e637">here</a></p><p><strong>icon.png: </strong>It is an image which should be of size <strong>19x19px</strong> which will be the icon of our extension</p><blockquote><strong><em>Create the manifest file</em></strong></blockquote><p>This is a JSON file used to describe our plugin to chrome. Populate the <strong>manifest.json </strong>with the below code</p><pre>{&quot;name&quot;: &quot;Greetings extension&quot;,&quot;browser_action&quot;: {<br> &quot;manifest_version&quot;: 2, <br> &quot;description&quot;: &quot;This extension will greet you&quot;,<br> &quot;default_icon&quot;: &quot;icon.png&quot;,<br> &quot;default_popup&quot;: &quot;extension.html&quot;<br> },<br> &quot;permissions&quot;: [<br> &quot;activeTab&quot;<br> ]<br>} <br> &quot;version&quot;: &quot;1.0&quot;,</pre><p>I hope most of the fields are self-explanatory look at the field <strong>browser_action </strong>it describes our <strong>default_icon </strong>and the <strong>default_popup </strong>which describes which file has to be loaded first when we access our extension. In the <strong>permissions </strong>field, we can restrict our extension to be active at which tabs/URL.</p><p>Refer <a href="https://www.itrelease.com/2019/07/what-is-chrome-extension-manifest-with-example/">here</a> to learn deep about extension manifest files.</p><blockquote><strong><em>Create the user interface</em></strong></blockquote><p>First, we have to place the contents so populate the <strong>extension.html </strong>with the below code</p><p>Now we have to design how this content has to look, I have designed a sample page.</p><p>For this populate the <strong>extension.css</strong> file with the below code</p><blockquote><strong><em>Implement how it should work</em></strong></blockquote><p>Populate the <strong>extension.js </strong>with the following code</p><pre>document.addEventListener(&#39;DOMContentLoaded&#39;, function() {<br> var button = document.getElementById(&#39;sayHi&#39;);<br> button.addEventListener(&#39;click&#39;, function() {<br> var a = prompt(&quot;Tell me your name master!&quot;,&quot;master&quot;);<br> alert(&quot;Hello &quot;+a+&quot;\nHave a good day!&quot;);<br> }, false);<br>}, false);</pre><p>This code gets your name and greets you in return with your name</p><p>hey, we developed an extension!!!!..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/0*CYEJvv_sBYJnW59S.png" /></figure><p>chrome://extensions/ in address bar</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/244/0*_fOBz-6345VWV31w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/0*QYKWfPBbNzT6GhDT.png" /></figure><ul><li>Now browse and select our project folder(i.e First_Chrome_Extension)</li><li>If there is no error it will be listed like</li></ul><p>in this case, you need to debug and fix the bug …if you need any assistance leave a comment I will help you.</p><blockquote><strong><em>Now lets see how our extension works</em></strong><em>.</em></blockquote><p>This pops up when we click on our extension</p><p>On clicking the Hi Chrome button this window pops up</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55d6f36ed49e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ever wondered about deploying an application with 0MB in ALL environments?]]></title>
            <link>https://techelucidator.medium.com/ever-wondered-about-deploying-an-application-with-0mb-in-all-environments-f48628ee2185?source=rss-e01e58bb3850------2</link>
            <guid isPermaLink="false">https://medium.com/p/f48628ee2185</guid>
            <category><![CDATA[must-read]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[tech-blog]]></category>
            <category><![CDATA[progressive-web-app]]></category>
            <dc:creator><![CDATA[Tech Elucidator]]></dc:creator>
            <pubDate>Sat, 11 Jul 2020 09:46:52 GMT</pubDate>
            <atom:updated>2022-08-31T07:37:06.862Z</atom:updated>
            <content:encoded><![CDATA[<h3>Ever wondered about deploying an application with 0MB in ALL environments.. ios, android, windows, etc?</h3><p>Is it really possible... yes, it is… now pull your mobile and open your storage manager on your mobile I am sure that half of the memory will be taken by apps right? guess what today we need to download an application and install it and then if they provide any update we need to update periodically or else some part of the time the app doesn’t work oh god...</p><p>For example, on my mobile I am having call of duty mobile which ranges approximately to 2GB right, every time I receive an update it is around 2GB I must update or else the game will not work .. think what if you install call of duty in 0MB and doesn’t need to update for a lifetime and still you get the latest features …sounds great right</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Yqc02CGtMBEuhjCu" /><figcaption>Photo by <a href="https://unsplash.com/@benwhitephotography?utm_source=medium&amp;utm_medium=referral">Ben White</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote><em>I know </em><strong><em>call of duty is not web application </em></strong><em>if it is then think</em></blockquote><p>Nowadays its been difficult to design, and manage applications for different platforms we are going to produce one app manage that app and support all environments like android, ios, windows, ubuntu, CentOS etc.. looks cool right</p><p>Now you all get a question like <strong>how to do it?</strong>.. the answer is <strong>PWA</strong> i.e. Progressive Web Application.. hey! hey! I know PWA is a stranger but don’t worry PWA will be your buddy( <strong>you will build your own PWA</strong>) after you finish reading this blog that’s my promise...</p><p>This naughty boy is expecting something to accept you as a buddy. Let&#39;s see what he is expecting:</p><ol><li>To know about him.</li><li>To give him a web application.</li><li>To inform him about the application you gave.</li></ol><p>A Progressive Web App is actually a web app that delivers an app-like experience to users by using modern web capabilities such as,</p><ul><li>To install it anywhere irrespective of running environment like windows, Linux, android, ios, etc.</li><li>To get a push notification, access it offline, to do background synchronization</li></ul><p>And so much more... In the end, it’s just your website that runs with the help of a browser in the background with modern web capabilities.</p><p>Don’t panic we are just going to have a simple web app using HTML, CSS and JavaScript.</p><p>Create a root folder say PWA and inside it create an HTML file with the name <strong>index.html </strong>and add the following code</p><p>Above is a markup language that shows content like My First Pwa! Now Create a folder <strong>CSS </strong>inside the root folder and create a file named <strong>style.css </strong>and add the following code</p><p>I’ve styled it to fill the entire browser viewport. The content is then centred and the text is set in sans-serif type.</p><p>Now we test our simple web app. Host our web app using some web server. I used <strong>tomcat for hosting and sublime text for editing code. </strong>To host place your root folder(PWA) in the webapps folder inside tomcat now run the server and access your application by http://&lt;ipv4_address&gt;:&lt;port&gt; in my case it is <a href="http://localhost:8080..">http://localhost:8080.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*AwDxatoF8KndCMrS.png" /></figure><p>Preview</p><p>Hurray Now we have done the web application. Let&#39;s provide it to him</p><p>It involves two steps <strong>Adding web app manifests</strong> and <strong>Registering service workers</strong></p><p>The manifest<a href="https://web.dev/add-manifest/"><em> file</em></a> is a simple JSON file that will specify how the app work and look. Now add the below code in the <strong>manifest.json</strong> file in the <strong>root</strong> folder</p><pre>{<br> &quot;name&quot;: &quot;First PWA&quot;,<br> &quot;short_name&quot;: &quot;PWA&quot;,<br> &quot;lang&quot;: &quot;en-US&quot;,<br> &quot;start_url&quot;: &quot;/index.html&quot;,<br> &quot;display&quot;: &quot;standalone&quot;,<br> &quot;background_color&quot;: &quot;black&quot;,<br> &quot;theme_color&quot;: &quot;black&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/0*x8k1vTuQlfPkjD41.png" /></figure><p>Prompt Window in PC</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/0*ieXIvbEbzmfunGn4.png" /></figure><p>Prompt window in a mobile</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/72/0*_FnMgPDXgyjnzB1k.png" /></figure><p>PWA as app name</p><p><strong>name: </strong>The title of the application which will be shown in the prompting window to install the app. (In mobile it will be prompted like add to the homepage )</p><p><strong>short_name: </strong>This will be the name of the application after installation.</p><p><strong>lang: </strong>The default language of the application.</p><p><strong>start_url: </strong>Tells the browser which page should be first loaded when the application starts up.</p><p><strong>display: </strong>The type of the application. we are using standalone in order to provide a native app-like feel.</p><p><strong>background_color:</strong> The colour of the screen that will splash while opening the application.</p><p><strong>theme_color: </strong>Theme of our application which will be applied to toolbar and task switcher.</p><p>Now we have to link this to our web application so that we will easily understand our web application so add it into the <strong>head </strong>tag of <strong>index.html </strong>like</p><p><a href="https://developers.google.com/web/fundamentals/primers/service-workers/"><em>Service workers</em></a> are scripts that run in the background in a separate thread (so it can’t manipulate DOM) capable of automating some stuff that the user feels bored doing. In our case, we use those service workers to store our files in the cache so that users can get our service offline too(if our application doesn’t need internet to operate) or else we can use service workers for other works.</p><blockquote><em>Note: Service workers will work only in https mode if we access across devices while in case of localhost it will work in http mode too.</em></blockquote><blockquote><em>Service workers can access the file in same directory and sub directory hence it should be placed in root directory.</em></blockquote><p>Create a file named <strong>sw.js </strong>in the <strong>root</strong> folder and add the following contents</p><pre>var cacheName = &#39;pwa&#39;; // name of the cache//start the service worker and cache the contents// serve cached contents when offline<br>var filesToCache = [ // array of files to be cached<br>self.addEventListener(&#39;install&#39;, function(e) {<br>self.addEventListener(&#39;fetch&#39;, function(e) {<br> e.respondWith(<br> caches.match(e.request).then(function(response) {<br> return response || fetch(e.request);<br> })<br> );<br>}); <br> e.waitUntil(<br> caches.open(cacheName).then(function(cache) {<br> return cache.addAll(filesToCache);<br> })<br> );<br>}); <br> &#39;/&#39;,<br> &#39;/index.html&#39;,<br> &#39;/css/style.css&#39;,<br> &#39;/js/main.js&#39;<br>];</pre><p>Now that the service worker script is created we need to register it with our application. Create a file named in the folder and enter the following code:</p><pre>window.onload = () =&gt; {if (&#39;serviceWorker&#39; in navigator) {<br> &#39;use strict&#39;; // to be executed in strict mode <br> navigator.serviceWorker<br> .register(&#39;./sw.js&#39;);<br> }<br>}</pre><p>Add the code to your app by including the script just before the closing &lt;/body&gt; tag in <strong>index.html</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/0*Wux-3gOwRgDgEzWc.png" /></figure><p>Folder Structure</p><p>This is what your folder structure should look like…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qqYuHl7jBgtqlskb.png" /></figure><p>After installing you could see the app location on your desktop like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/0*x4DtqNkXTEpnW00o.png" /></figure><p>The message came after i added to my mobile <strong>check size</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XW9BCzFEyIK-jifb.jpeg" /></figure><p>App Installed on my mobile</p><p><strong>- — — — — — — — HEY LISTEN YOU HAVE DONE IT!! — — — — — — — -</strong></p><blockquote><em>Note: The app size varies depends upon the files you cache</em></blockquote><p>You can check it live <a href="https://unruffled-archimedes-d3f2c4.netlify.app/"><strong><em>here</em></strong></a><em>.</em> You can access it offline too after you have checked once online try it :)</p><p>Thanks for your patience to read my blog... Kindly do more claps and comments to ensure that you are benefited from this…</p><p>If you have any more queries regarding how to host in HTTPS mode or in code or have any suggestions kindly comment.</p><p>Have a great day... tata...</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f48628ee2185" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>