<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aaron Lienhard</title>
    <description>The latest articles on DEV Community by Aaron Lienhard (@aaronlienhard).</description>
    <link>https://dev.to/aaronlienhard</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F794939%2F93c874da-e1a8-4fb9-9499-23ba650ac6e5.png</url>
      <title>DEV Community: Aaron Lienhard</title>
      <link>https://dev.to/aaronlienhard</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aaronlienhard"/>
    <language>en</language>
    <item>
      <title>Deploying a Site with Vercel</title>
      <dc:creator>Aaron Lienhard</dc:creator>
      <pubDate>Mon, 14 Mar 2022 02:05:43 +0000</pubDate>
      <link>https://dev.to/aaronlienhard/deploying-a-site-with-vercel-584e</link>
      <guid>https://dev.to/aaronlienhard/deploying-a-site-with-vercel-584e</guid>
      <description>&lt;h2&gt;
  
  
  What is Vercel?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Vercel is a platform that allows you to easily build, deploy, and scale a website and have it viewable to the world in literal seconds.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you ever had trouble getting a site to build using GitHub Pages, Vercel takes away all the extra work and configures everything for you.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I've never had an easier time when it comes to deploying a website than when I used Vercel.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to get started with Vercel
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;To get started with Vercel you are going to want to go to their &lt;a href="https://vercel.com/cli"&gt;website&lt;/a&gt;. The homepage will look like this:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C1Y6dwft--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fbxv05lql75sfb2h7fzc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C1Y6dwft--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fbxv05lql75sfb2h7fzc.png" alt="Vercel Website Homepage" width="880" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once here you can install Vercel either to a specific project or globally using the command below. Use the command either in a specific project directory or just as you launch terminal. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;npm i -g vercel&lt;/code&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You next step will be to login to Vercel and provide access to your GitHub account. Once your GitHub account has access you can go to your dashboard and create a project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once you click the create a project button you can choose a GitHub repository you will like to deploy and then it's as simple as pressing the deploy button. As long as the code is all in the correct directories and npm start is working then the website should deploy with no issues.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  11ty Blog Site Deployed with Vercel
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Here is an example of a blog site I created with an 11ty template. I was able to deploy the website through Vercel and have this live version for anyone to go to and look at the website.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--attf7nWh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzo3oflgkosfw295y81n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--attf7nWh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzo3oflgkosfw295y81n.png" alt="11ty Blog Website" width="880" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To access the website you can click &lt;a href="https://11ty-lab-website-1.vercel.app/"&gt;here.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  ist-vercel-demo Deployed with Vercel
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Here is the ist-vercel-demo we had to clone for class and then get working as a website with Vercel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fGCrTGSG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzfoupwdyo4w722l5avo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fGCrTGSG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hzfoupwdyo4w722l5avo.png" alt="ist-vercel-demo Website" width="880" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The link to the site is &lt;a href="https://vercel-demo-flax.vercel.app/"&gt;here.&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Getting this website to deploy was as simple as clicking the button and waiting for Vercel to do its job. Seriously made creating a website one of the simplest processes ever.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How does Vercel compare to other ways of deploying as a developer
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Compared to using GitHub pages and manually setting up work flows can be frustrating to say the least. Compared to Vercel it is seriously night and day with how simple you can get a repository running on the web.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If I knew someone who wanted to get their GitHub repo working online and seeing a working website, I would immediately point them to Vercel as I believe it's one of the best ways to do what they want to do.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>vercel</category>
    </item>
    <item>
      <title>Creating a Blog with 11ty</title>
      <dc:creator>Aaron Lienhard</dc:creator>
      <pubDate>Mon, 28 Feb 2022 03:45:52 +0000</pubDate>
      <link>https://dev.to/aaronlienhard/creating-a-blog-with-11ty-1mom</link>
      <guid>https://dev.to/aaronlienhard/creating-a-blog-with-11ty-1mom</guid>
      <description>&lt;h2&gt;
  
  
  What is 11ty?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.11ty.dev/"&gt;11ty&lt;/a&gt; is a static site generator that you can use with a variety of different templates to easily build and deploy your own website.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use a blog template
&lt;/h2&gt;

&lt;p&gt;To begin to use 11ty by creating a simple blog, we'll first want to head over to 11ty's page with different starter projects.&lt;/p&gt;

&lt;p&gt;You can go to that page &lt;a href="https://www.11ty.dev/docs/starter/"&gt;here.&lt;/a&gt; You'll then come to a page that looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NsQUmRHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lxn4ugvstonpbag7ga0f.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NsQUmRHx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lxn4ugvstonpbag7ga0f.PNG" alt="11ty Start Projects Page" width="880" height="576"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you click on the source code button under the template you want, it'll then take you to that template's GitHub page.&lt;/p&gt;

&lt;p&gt;In this post I'll click on the first template titled, "eleventy-base-blog."&lt;/p&gt;

&lt;p&gt;From here you're going to want to press the "Use this template" button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NNRSMYvb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q9kbm6yjaqom4eiebw2d.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NNRSMYvb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q9kbm6yjaqom4eiebw2d.PNG" alt="GitHub repository page" width="880" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://github.com/11ty/eleventy-base-blog"&gt;eleventy-base-blog repository&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Once you click the button, you'll be able to create a new repository for your account and then clone that to your local system.&lt;/p&gt;

&lt;p&gt;Once cloned, run "npm install" in the directory. Then "npx eleventy --serve" to build the website locally and run be able to access it through localhost. When you go to localhost, the base website will look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CmrJ6Er6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owko9xm8ecnhzb6u4yzt.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CmrJ6Er6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owko9xm8ecnhzb6u4yzt.PNG" alt="Base Website" width="880" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can follow the instructions in the GitHub repository to edit the website to add your own information. Congrats, you just were able to create a new blog website based on a template from 11ty!&lt;/p&gt;

&lt;h2&gt;
  
  
  1st Blog Site
&lt;/h2&gt;

&lt;p&gt;My first blog was created with &lt;a href="https://github.com/11ty/eleventy-base-blog"&gt;the eleventy-base-blog template.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It contains a total of 4 blog posts, which are all identical to the posts on this dev.to account.&lt;/p&gt;

&lt;p&gt;Here is a picture of what the website looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nu4z-7BJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qox73jsq5wynaz8fxyk9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nu4z-7BJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qox73jsq5wynaz8fxyk9.png" alt="1st Website" width="880" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As well as a link to site's GitHub repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/aaronlienhard/11ty-Lab-Website-1"&gt;Blog 1 GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2nd Blog Site
&lt;/h2&gt;

&lt;p&gt;My second blog was created with &lt;a href="https://github.com/moody-person/11ty-starter"&gt;the 11ty-starter template.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It contains a total of 4 blog posts, which are all identical to the posts on this dev.to account. Just like the first blog website.&lt;/p&gt;

&lt;p&gt;This site is more stylized than the original site having different colored text for the post titles, a footer, and some other changes. However, the content is all the exact same.&lt;/p&gt;

&lt;p&gt;Here is a picture of what the website looks like (example, for some reason mine wouldn't build correctly even locally):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K15bk21N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cgbxgm4u1dghlsy2y17l.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K15bk21N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cgbxgm4u1dghlsy2y17l.PNG" alt="2nd website" width="880" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As well as a link to site's GitHub repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/aaronlienhard/11ty-Lab-Website-2"&gt;Blog 2 GitHub&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3rd Blog Site
&lt;/h2&gt;

&lt;p&gt;My third blog was created with &lt;a href="https://github.com/madebymike/supermaya"&gt;the supermaya template.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It contains a total of 4 blog posts, which are all identical to the posts on this dev.to account. Just like the first and second blog website. &lt;/p&gt;

&lt;p&gt;This site has more links on the header, a footer that explains what the Supermaya kit is, as well as box at the top that explains what the blog is. However, the content is all the exact same as the first two websites.&lt;/p&gt;

&lt;p&gt;Here is a picture of what the website looks like (example, for some reason mine wouldn't build correctly even locally):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oLZC-JLR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nxi1gpmdgf5r7dmwvva5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oLZC-JLR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nxi1gpmdgf5r7dmwvva5.PNG" alt="3rd website" width="880" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As well as a link to site's GitHub repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/aaronlienhard/11ty-Lab-Website-3"&gt;Blog 3 GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>11ty</category>
    </item>
    <item>
      <title>The Power of Docker</title>
      <dc:creator>Aaron Lienhard</dc:creator>
      <pubDate>Mon, 28 Feb 2022 03:45:40 +0000</pubDate>
      <link>https://dev.to/aaronlienhard/the-power-of-docker-pmg</link>
      <guid>https://dev.to/aaronlienhard/the-power-of-docker-pmg</guid>
      <description>&lt;h2&gt;
  
  
  What is Docker?
&lt;/h2&gt;

&lt;p&gt;Docker is an open platform that allows the user to virtually create different software packages in things called, "containers"&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is Docker so powerful?
&lt;/h2&gt;

&lt;p&gt;Docker is so powerful because you're able to very easily create software and play around with it very quickly without having to worry about a lot of the backend part of the code and how getting the server up and running works&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use 'Play with Docker'
&lt;/h2&gt;

&lt;p&gt;To start with 'Play with Docker' you'll need to head over to the &lt;a href="https://labs.play-with-docker.com/"&gt;website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you're on the website, create an account and login. Once you log in the green "login" button on the homepage will change to say "start"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aTXRd9dJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o0w9zxwfabpckrmy6zm9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aTXRd9dJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o0w9zxwfabpckrmy6zm9.png" alt="Docker Homepage" width="880" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you hit start, you'll see a page that looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xjXeJpM4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8z969yu3saae1zfywq04.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xjXeJpM4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8z969yu3saae1zfywq04.png" alt="Play with Docker Main Page" width="880" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now to start playing around with Docker you can just hit the "+ Add New Instance" button" and you'll start the Docker server and the webpage will look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--olJnBtgD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rzkqcdkqwzdy6810jcvt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--olJnBtgD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rzkqcdkqwzdy6810jcvt.png" alt="Docker New Instance" width="880" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you're all ready to play around with Docker, have fun!&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a DockerFile for our NASA Image Search repo
&lt;/h2&gt;

&lt;p&gt;In order to get your own web application running in Docker you will first need a DockerFile.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here is a link to the Docker Docs that explain what a Docker File is and how to create one. &lt;a href="https://docs.docker.com/get-started/02_our_app/"&gt;Docker Docs - Docker File&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In order to actually build your Docker container you need to run, &lt;code&gt;docker build -t getting-started .&lt;/code&gt; but replace the "getting-started" with the name of your component.&lt;/p&gt;

&lt;p&gt;To actually start the app container all you have to do is type &lt;code&gt;docker run -dp 3000:3000 getting-started&lt;/code&gt; into the terminal and just like last step replace "getting-started" with the component name.&lt;/p&gt;

&lt;p&gt;Make sure you open the 3000 port through Play with Docker, or go to &lt;a href="http://localhost:3000"&gt;localhost:3000&lt;/a&gt; to see the application if using the downloaded version of Docker.&lt;/p&gt;

</description>
      <category>docker</category>
    </item>
    <item>
      <title>Using the GeoIP Element + Wikipedia Query Tag</title>
      <dc:creator>Aaron Lienhard</dc:creator>
      <pubDate>Tue, 01 Feb 2022 03:01:21 +0000</pubDate>
      <link>https://dev.to/aaronlienhard/using-the-geoip-element-wikipedia-query-tag-13on</link>
      <guid>https://dev.to/aaronlienhard/using-the-geoip-element-wikipedia-query-tag-13on</guid>
      <description>&lt;h2&gt;
  
  
  What is the GeoIP element?
&lt;/h2&gt;

&lt;p&gt;The GeoIP element allows you to take a computer's ip address and convert it to both a longitude and latitude. Using this element, a webpage can instantly return a geolocation just based off of the computer's ip address that it accesses the webpage from.&lt;/p&gt;

&lt;p&gt;Check out more information on the GeoIP at this link: &lt;a href="https://freegeoip.app/"&gt;GeoIP&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What can we do with the GeoIP element + Wikipedia Query tag?
&lt;/h2&gt;

&lt;p&gt;By using the geolocation returned with the GeoIP element, you're able to search parts of that location with the Wikipedia Query tag. When the search is completed, the query tag displays the Wikipedia article that is associated with the search term you feed the tag. &lt;/p&gt;

&lt;p&gt;If you want to add the wikipedia query tag to your webpage, simply import it at the top of your JavaScript File using this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import '@lrnwebcomponents/wikipedia-query/wikipedia-query.js';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also check out component &lt;a href="https://www.npmjs.com/package/@lrnwebcomponents/wikipedia-query"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, if I wanted to query Wikipedia for the city and state that is returned from the element, the code would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;wikipedia-query search="${this.city}, ${this.state}"&amp;gt;&amp;lt;/wikipedia-query&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, if the location was "University Park, United States" then the wikipedia-query tag would return this on the webpage: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U-L0e3R8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxr22hqj81yewoqli8su.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U-L0e3R8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxr22hqj81yewoqli8su.png" alt="University Park, United States Example Wikipedia Query" width="880" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How does the GeoIP element grab this data?
&lt;/h2&gt;

&lt;p&gt;The GeoIP element uses fetch(), this is what the fetch command looks like within the element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch(this.locationEndpoint + userIPData.ip)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first part of the fetch gets, "this.locationEndpoint" this part is connected to &lt;a href="https://freegeoip.app/json/"&gt;Free Geo IP&lt;/a&gt;. If you go to this website, then you'll get a json response that shows a json file that displays various information based on that system's ip address. Here is an example of what it shows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
"ip": "23.105.173.167",
"country_code": "US",
"country_name": "United States",
"region_code": "DC",
"region_name": "District of Columbia",
"city": "Washington",
"zip_code": "20016",
"time_zone": "America/New_York",
"latitude": 38.9379,
"longitude": -77.0859,
"metro_code": 511
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second part of the fetch grabs the user's ip data from the userIP JavaScript file. Here's the code it uses in order to get the user's ip address:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  async updateUserIP() {
    return fetch(this.ipLookUp)
      .then(resp =&amp;gt; {
        if (resp.ok) {
          return resp.json();
        }
        return false;
      })
      .then(data =&amp;gt; {
        this.ip = data.ip;
        return data;
      })
      .then(data =&amp;gt; {
        this.location = `${data.city}, ${data.country}`;
        return data;
      });
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using these two data points, the element is able to convert the user's ip address that it gets and change it into a usable longitude and latitude of that ip's location.&lt;/p&gt;

&lt;h2&gt;
  
  
  What can we do with the longitude and latitude we receive?
&lt;/h2&gt;

&lt;p&gt;With the longitude and latitude from the fetch() method, we can plug those values into a Google Maps url and embed that location's Google Map's result into the webpage. We do that using this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://maps.google.com/maps?q=${this.lat},${this.long}&amp;amp;t=&amp;amp;z=15&amp;amp;ie=UTF8&amp;amp;iwloc=&amp;amp;output=embed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's an example of what that embed looks like on the website:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8e8vrcF1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/864d3e40icmsx1syswok.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8e8vrcF1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/864d3e40icmsx1syswok.png" alt="Google Maps Embed Example" width="880" height="732"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My github repository to view the used project's code
&lt;/h2&gt;

&lt;p&gt;If you want to look at the ip-project github repo, you can do so from this link: &lt;a href="https://github.com/aaronlienhard/ip-project"&gt;IP Project Repository&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building Your First Web Component with Open-WC</title>
      <dc:creator>Aaron Lienhard</dc:creator>
      <pubDate>Mon, 17 Jan 2022 04:44:00 +0000</pubDate>
      <link>https://dev.to/aaronlienhard/building-your-first-web-component-with-open-wc-1io9</link>
      <guid>https://dev.to/aaronlienhard/building-your-first-web-component-with-open-wc-1io9</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Welcome! This blog post will help you be well on your way to creating your very own web components with open-wc. In order to create your first component you'll have to download and learn about some software/tools that will be required in order to create the component. Don't worry though! This post will take you step by step through the installation process as well as help you understand a little more about the things you're installing. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is tutorial was made on a mac machine, different operating systems may yield different results&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is NodeJS?
&lt;/h2&gt;

&lt;p&gt;To start, you're going to download a JavaScript runtime called, "NodeJS." NodeJS is simply a JavaScript runtime environment that runs JavaScript code outside of the actual web browser. This allows us to build scalable network applications (&lt;a href="https://nodejs.org/en/about/"&gt;About NodeJS&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZqtZPrwE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eqyrhot3c9xcxdvchvhu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZqtZPrwE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eqyrhot3c9xcxdvchvhu.png" alt="NodeJS Logo" width="491" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing NodeJS
&lt;/h2&gt;

&lt;p&gt;Now let's install NodeJS onto your machine! To start, head over to the NodeJS website at, &lt;a href="https://nodejs.org/en/"&gt;NodeJS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From here, you should see a website that looks like this: ↓&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JoR16mFU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hf26vtugx7gxz1aqna58.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JoR16mFU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hf26vtugx7gxz1aqna58.png" alt="NodeJS's Homepage" width="880" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You'll want to click on the big green button that says, "16.13.2 LTS - Recommended For Most Users"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Hh4VQDDj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rm8zd2wvfhlhrehz4et7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Hh4VQDDj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rm8zd2wvfhlhrehz4et7.png" alt="16.13.2 LTS Button" width="480" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you click on the button, it'll download a "pkg" file and from there you can run it and go through the download process. Once you're done installing NodeJS you will have also gotten NPM (Node Package Manager) installed with it, so now all that's left is to check and make sure everything is installed correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Confirming NodeJS + NPM Installation
&lt;/h2&gt;

&lt;p&gt;In order to confirm that both NodeJS and NPM were installed correctly, you're going to want to open up the terminal. My terminal might look slightly different from yours, that's because I'm using Oh My Zsh, which you can install through their website here: &lt;a href="https://ohmyz.sh/"&gt;Oh My Zsh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the terminal is opened, it'll look something like this: ↓&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SooJERm---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mribrxtqpeqr1an5ux0r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SooJERm---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mribrxtqpeqr1an5ux0r.png" alt="Starting Terminal" width="880" height="553"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From here, type in "node -v"&lt;br&gt;
Assuming that everything is installed correctly, you should see something like this: ↓&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z9VSoWPm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e6nsdn019al6hgyvit26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z9VSoWPm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e6nsdn019al6hgyvit26.png" alt="Node Verification" width="880" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As long as there is a version number displayed, that means that NodeJS was installed correctly!&lt;/p&gt;

&lt;p&gt;Next, we just have to do the same thing but for NPM. The command in terminal to check NPM's version is "npm -v" &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HuY52x8a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/odiq2swca2t47d1sjw63.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HuY52x8a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/odiq2swca2t47d1sjw63.png" alt="NPM Verification" width="880" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As long as you can see a version number for both NodeJS and NPM, then you can move onto the next section of the tutorial. If you do not see version numbers, check and make sure that you downloaded the correct version of NodeJS and that the installation finished successfully.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating Open-WC Web Component
&lt;/h2&gt;

&lt;p&gt;In order to actually create your web component you first have to pick a file directory that you want to save it in.&lt;/p&gt;

&lt;p&gt;The file directory for my folder is, "Documents/edtechjoker/edtechjoker-lab1"&lt;/p&gt;

&lt;p&gt;You want to cd into the directory using the terminal, it should look similar to the image below: ↓&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y0wB8WEp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tvvswekw2qubob8snf82.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y0wB8WEp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tvvswekw2qubob8snf82.png" alt="Component File Directory" width="880" height="552"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once inside of the directory you want the component to live in, you should type "npm init @open-wc" into terminal. Doing so should bring up a dialog box like this: ↓&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ncYBvHFK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrirdg8z3605u50ae8xz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ncYBvHFK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrirdg8z3605u50ae8xz.png" alt="NPM Init" width="880" height="552"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Here are the steps to actually creating the web component within the directory you specified:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;❯   Scaffold a new project&lt;/li&gt;
&lt;li&gt;❯   Web Component&lt;/li&gt;
&lt;li&gt;❯   No&lt;/li&gt;
&lt;li&gt;Input the name you want for the component&lt;/li&gt;
&lt;li&gt;❯   Yes&lt;/li&gt;
&lt;li&gt;❯   Yes, with npm&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As long as you hit all the correct responses you should have created the component and get a terminal window that looks like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--42i8MdF---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/34yex5jbove6b5au1pye.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--42i8MdF---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/34yex5jbove6b5au1pye.png" alt="Created Component" width="880" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As mentioned, you can open the component by typing, &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; cd hello world
 npm run start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;That will launch the component within a web browser. If you type those commands now, it should look something like this:  ↓&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gaMiMUJ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ddlyg9cdzdl293z6ti96.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gaMiMUJ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ddlyg9cdzdl293z6ti96.png" alt="Hello World Component" width="880" height="429"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;If you see a page like the one above, then you're ready to edit your code in any editor of your choice. I mainly use Visual Studio Code for web-related programming.&lt;/p&gt;

&lt;h2&gt;
  
  
  Editing Web Component through Visual Studio Code
&lt;/h2&gt;

&lt;p&gt;You can install Visual Studio code through their website at, &lt;a href="https://code.visualstudio.com/"&gt;Visual Studio Code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have Visual Studio Code installed, you should see a screen similar to this once it's launched: ↓&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hEGdA5S0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3u7psoxwo7z4ne8v1h1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hEGdA5S0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3u7psoxwo7z4ne8v1h1.png" alt="Visual Studio Code" width="880" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow these next steps to open the web component we just created in Visual Studio Code&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;File&lt;/li&gt;
&lt;li&gt;Open&lt;/li&gt;
&lt;li&gt;Navigate to the directory where you saved the component&lt;/li&gt;
&lt;li&gt;Open the "hello-world" folder&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You then should get a screen like this, the .js code you will want to edit is within the "src" folder&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pbpxHyFJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/smm1hlia0crz5tp2k8so.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pbpxHyFJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/smm1hlia0crz5tp2k8so.png" alt="Web Component Code" width="880" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Product
&lt;/h2&gt;

&lt;p&gt;Using &lt;a href="https://lit.dev/playground/#sample=examples/full-component"&gt;Lit's Playground&lt;/a&gt; as a reference, I was able to make this very quick and easy Hello World web component. Hopefully you all will now be well on your way to creating web components as well!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SnP5dmcK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zq3zpgzbcxlqefrbgva3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SnP5dmcK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zq3zpgzbcxlqefrbgva3.png" alt="Code + Component" width="880" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  GitHub Repository
&lt;/h2&gt;

&lt;p&gt;Here is the GitHub Repository that I uploaded my web component to, &lt;a href="https://github.com/aaronlienhard/edtechjoker-lab1"&gt;My Lab 1 GitHub Repository&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webcomponents</category>
    </item>
  </channel>
</rss>
