<?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: jfz5219</title>
    <description>The latest articles on DEV Community by jfz5219 (@jfz5219).</description>
    <link>https://dev.to/jfz5219</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%2F795164%2F72af5277-3680-4208-bba0-507112f8fbfe.png</url>
      <title>DEV Community: jfz5219</title>
      <link>https://dev.to/jfz5219</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jfz5219"/>
    <language>en</language>
    <item>
      <title>Vercel</title>
      <dc:creator>jfz5219</dc:creator>
      <pubDate>Mon, 14 Mar 2022 02:32:17 +0000</pubDate>
      <link>https://dev.to/jfz5219/vercel-340h</link>
      <guid>https://dev.to/jfz5219/vercel-340h</guid>
      <description>&lt;p&gt;Vercel is a platform that enables developers to focus on the frontend side of an application because the backend is abstracted away from them. It handles the building process and deployment of an application. If you link your GitHub repository to Vercel, any changes pushed to the repo will automatically be deployed to the server. This speeds up launching and increases the scalability of a website.&lt;/p&gt;

&lt;p&gt;There are two type of functions that can be deployed, Edge Functions and Serverless Functions. &lt;/p&gt;

&lt;p&gt;*&lt;em&gt;&lt;a href="https://vercel.com/docs/concepts/functions/edge-functions"&gt;Edge Functions:&lt;/a&gt; *&lt;/em&gt;&lt;br&gt;
From my understanding, code is able to run closer to the user side because it runs through a middleware. The application is also built on V8 runtime. With these factors, startups are very fast.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;&lt;a href="https://vercel.com/docs/concepts/functions/serverless-functions"&gt;Serverless Functions:&lt;/a&gt; *&lt;/em&gt;&lt;br&gt;
Serverless functions allow developers to host their code on a cloud infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's get started
&lt;/h2&gt;

&lt;p&gt;First connect your GitHub account to Vercel. You can connect your repos on vercel or locally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On Vercel&lt;/strong&gt;&lt;br&gt;
Then, create a new project. You can import any of your GitHub repos into Vercel just by searching them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3XlZr2aL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pkz9sz3ya4ev24n51ro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3XlZr2aL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pkz9sz3ya4ev24n51ro.png" alt="Image description" width="880" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Locally&lt;/strong&gt;&lt;br&gt;
Once you are in your GitHub repo locally, add this in you command line.&lt;br&gt;
&lt;code&gt;npm i -g vercel&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Use this to build and deply.&lt;br&gt;
&lt;code&gt;vercel&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Follow through the series of steps in the command line to deploy your application. &lt;/p&gt;

&lt;p&gt;I set up vercel locally through my repo called ist-vercel-demo. An extra step I had to do was add an .env file for this to work locally. Here's how everything looked when I finished the steps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eXvUJs1Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p9rzzhwqxc3a1hb05h20.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eXvUJs1Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p9rzzhwqxc3a1hb05h20.png" alt="Image description" width="828" height="126"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xcqfkuva--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3bhegoku981qswqkv3f9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xcqfkuva--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3bhegoku981qswqkv3f9.png" alt="Image description" width="880" height="473"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Quickstart and GitHub CI/CD Pipeline
&lt;/h2&gt;

&lt;p&gt;You can even deploy templates provided by Vercel to see how fast the process is. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://vercel.com/docs"&gt;Templates&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I used the 11ty template and with a few clicks, I was able to build and deploy this website.&lt;/p&gt;

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

&lt;p&gt;Compared to GitHub's CI/CD pipline, I think it was easier due to the user friendly UI. GitHub required a bit more setup. For example, a yml file is needed for the workflow. Also, you have to navigate to the Pages tab to get the website's URL. GitHub had trouble building one of my 11ty website, where as Vercel had no problems. &lt;/p&gt;

&lt;p&gt;I built and deployed three 11ty based websites using Vercel. Just like the quickstart, it was very easy to set up, just select the repo you want to import from GitHub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://11ty-hello-world-jade.vercel.app/"&gt;&lt;strong&gt;Website #1: 11ty-hello-world&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tIBmMp_M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/69r8tuemt4mi0bhs8rmy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tIBmMp_M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/69r8tuemt4mi0bhs8rmy.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://my-blog-name.vercel.app/"&gt;&lt;strong&gt;Website #2: 11ty-hello-world (GitHub had trouble building this application)&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ODYfJH1F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sjaxkwydbpoeaptd73oe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ODYfJH1F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sjaxkwydbpoeaptd73oe.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://11ty-hello-world-jade.vercel.app/"&gt;&lt;strong&gt;Website #1: 11ty-hello-world&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
This deployed successfully but when visiting the website, I kept getting 404 errors.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8jbgE5U3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2aux14d392dm1qbpff6f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8jbgE5U3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2aux14d392dm1qbpff6f.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Checkout Red Hat
&lt;/h2&gt;

&lt;p&gt;This website uses Vercel to quickly build, deploy, and do test iterations.&lt;br&gt;
&lt;a href="https://www.redhat.com/architect/micro-frontend-architecture"&gt;Red Hat&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Why is Docker Powerful and How to Get Started with "Play with Docker"</title>
      <dc:creator>jfz5219</dc:creator>
      <pubDate>Mon, 28 Feb 2022 00:38:50 +0000</pubDate>
      <link>https://dev.to/jfz5219/why-is-docker-powerful-and-how-to-get-started-with-play-with-docker-455</link>
      <guid>https://dev.to/jfz5219/why-is-docker-powerful-and-how-to-get-started-with-play-with-docker-455</guid>
      <description>&lt;h2&gt;
  
  
  Why use Docker?
&lt;/h2&gt;

&lt;p&gt;Docker is great tool you should use when developing an application. Many new developers probably start building a monolithic application. This could be when all your services, like your server, database, files are built on top of one operating system in a VM. There may be some downsides to this. For example, if there is an error with one of your services, you might risk of messing up the other services by trying to fix that one issue. &lt;/p&gt;

&lt;p&gt;With Docker, you are able to separate these services into containers so we can get rid of the dependencies they might have with each other. By doing this, these services will be self-contained. Now, it can exist by itself with all resources and dependencies encapsulated. Once we have these containers, we can move onto a microservice architecture. &lt;/p&gt;

&lt;p&gt;I think of microservices as Lego pieces because of how flexible a Lego structure is. If one piece breaks, you can effortlessly replace it with another. When an application is built on microservices that comes in a form of containers, these containers are like Lego pieces that can be easily replaced. Let's say your server, in a container, is causing errors. This will not effect your container with UI components and you can just make to the container update with a new server (if you decide to).&lt;/p&gt;

&lt;p&gt;Docker also works great in a collaborative setting. When another developer needs your application. They will already have the everything set up because Docker will help create the same environment that you worked with onto their working environment. This makes your application very portable. &lt;/p&gt;

&lt;p&gt;Another aspect of docker is its ability to automate work. You may have had to change directories, copy files, install dependencies when creating an application. However, all of this coding in your command prompt can be written to a dockerfile. &lt;/p&gt;

&lt;h2&gt;
  
  
  Play with Docker
&lt;/h2&gt;

&lt;p&gt;Using Play with Docker is a great way to introduce yourself to docker. Follow this &lt;a href="https://training.play-with-docker.com/beginner-linux/" rel="noopener noreferrer"&gt;tutorial&lt;/a&gt; first. It will show you how to create a few different type of containers. Once you are familiar with the concept of containerization, try using "Play with Docker". I used this to do an activity that I will discuss next.&lt;/p&gt;

&lt;p&gt;Here is a good video explaining Docker:&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=eGz9DS-aIeY" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=eGz9DS-aIeY&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  NewsAPI Activity
&lt;/h2&gt;

&lt;p&gt;Our class did an activity where we had to retrieve news from a news API and display it on a component. This required the use two containers; a server container and a component container. Each container needed a dockerfile and by using a docker-compose.yml file, we are able to run the multiple dockerfiles.&lt;/p&gt;

&lt;p&gt;component dockerfile&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fja4o5kgm4h1nxwj9tx3l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fja4o5kgm4h1nxwj9tx3l.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;server dockerfile&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8gymno2lpuyl5dcgjcyv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8gymno2lpuyl5dcgjcyv.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;docker-compose.yml&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn170a8kbl4nr0sdjz4sy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn170a8kbl4nr0sdjz4sy.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How to Create a DockerFile
&lt;/h2&gt;

&lt;p&gt;By using what I learned from the NewsAPI activity, this is how to create a dockerfile for the NASA image search repo(an assignment on components I did for class). &lt;/p&gt;

&lt;p&gt;First, create a file called Dockerfile. Then, we need a base image, I'll be using the same one from the NewsAPI example. This is what I think a dockerfile would look like for my NASA image search repo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM socialengine/nginx-spa

WORKDIR /IST402/nasa-search-image

COPY package.json ./
RUN npm install

COPY . .
CMD["npm", "start"]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I tried following the example from the NewsAPI dockerfile.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>11ty</title>
      <dc:creator>jfz5219</dc:creator>
      <pubDate>Sun, 27 Feb 2022 23:03:47 +0000</pubDate>
      <link>https://dev.to/jfz5219/11ty-1doh</link>
      <guid>https://dev.to/jfz5219/11ty-1doh</guid>
      <description>&lt;p&gt;First, try to get an understanding of what a static site generator is. This might be different from what your used to, so it helps to understand why you would want to get your hands on with this approach &lt;/p&gt;

&lt;p&gt;Here is a website to learn more about static site generators.&lt;br&gt;
Link: &lt;a href="https://www.netlify.com/blog/2020/04/14/what-is-a-static-site-generator-and-3-ways-to-find-the-best-one/"&gt;https://www.netlify.com/blog/2020/04/14/what-is-a-static-site-generator-and-3-ways-to-find-the-best-one/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To start, I tried creating three types of 11ty based websites.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Hello World Website&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I made a repo on git hub named 11ty-hello-world and cloned it. I changed my directory to 11ty-hello-world and followed this 11ty &lt;a href="https://www.11ty.dev/docs/getting-started/"&gt;documentation&lt;/a&gt; to get started. I added text to the README.md file where 11ty would compile these changes and update them on the index.html file. &lt;/p&gt;

&lt;p&gt;Link to website: &lt;a href="https://jfz5219.github.io/11ty_hello_world/"&gt;https://jfz5219.github.io/11ty_hello_world/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_u5vpd-I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06eodnqyj73cybj2dklh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_u5vpd-I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06eodnqyj73cybj2dklh.png" alt="Image description" width="880" height="434"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Eleventy Based Blog&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I used this &lt;a href="https://github.com/11ty/eleventy-base-blog"&gt;template&lt;/a&gt; to set up the second 11ty website. At this point, I was able to better understand the structure of 11ty. I tried adding an additional navigation tab called "Practice Tagging". This was all done under the practice.md file that I created. I just had to add these headings on top of the code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
layout: layouts/post.njk
title: "Practice"
templateClass: tmpl-post
eleventyNavigation:
  key: Practice Tagging
  order: 4
---
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;No website, will explain later.&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vjUjWgTP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4budd48o58ybbyo47cj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vjUjWgTP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4budd48o58ybbyo47cj.png" alt="Image description" width="880" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Hax11ty Website&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This one was fairly easy, all I had to do was use this &lt;a href="https://github.com/elmsln/hax11ty"&gt;template&lt;/a&gt;, clone it, yarn install, and yarn start. Originally, npm was used, but I ran into some problems, so yarn is used instead. &lt;/p&gt;

&lt;p&gt;Link to website: &lt;a href="https://jfz5219.github.io/hax_11ty/"&gt;https://jfz5219.github.io/hax_11ty/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D15Kzsqx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iskyimububskyoz55eur.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D15Kzsqx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iskyimububskyoz55eur.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Compare 11ty to HAX11ty&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The first thing I noticed was how easy it was to get started with HAX11ty. There was no need physically install eleventy. I am pretty sure this step is automated in the code. Where as setting up an 11ty website required a bit more steps even though it wasn't difficult to understand. Personally, I thought structure of 11ty was easier to understand and it's because the website is simpler compared to HAX11ty. The UI of HAX11ty looks more user-friendly, but the 11ty-based-blog can probably be changed with more add-ons.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;CI/CD Pipeline&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Here is a great video explaining why you would use GitHub workflow and how to get started with it. &lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=R8_veQiYBjI"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;No Link to Eleventy Based Blog!?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I was able to successfully set my workflow. However, when time came to build and run the code, I got an error. I believe GitHub was trying to use the Liquid language to process Nunjucks code. I had no clue on how to fix this, so that's why my GitHub page was not working.  &lt;/p&gt;

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

&lt;h2&gt;
  
  
  Links to Repos
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/jfz5219/11ty_hello_world"&gt;Hello World Blog&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/jfz5219/eleventy-base-blog"&gt;Eleventy Based Blog&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/jfz5219/hax_11ty"&gt;Hax11ty&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Your IP Address to Find Your Long/Lat Coordinates</title>
      <dc:creator>jfz5219</dc:creator>
      <pubDate>Mon, 31 Jan 2022 08:10:16 +0000</pubDate>
      <link>https://dev.to/jfz5219/getting-your-ip-address-to-find-your-longlat-coordinates-1koc</link>
      <guid>https://dev.to/jfz5219/getting-your-ip-address-to-find-your-longlat-coordinates-1koc</guid>
      <description>&lt;p&gt;&lt;strong&gt;ipLookUp API: Finding My IP Address&lt;/strong&gt;&lt;br&gt;
This part was completed in my previous lab 2 activity. I basically used the ipLookUp API to fetch the IP of my current location. I will be posting my source code at the end, but you can find this part under the UserIP.js file.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;ip-api API: Finding My Coordinates&lt;/strong&gt;&lt;br&gt;
For this part, I was suppose to use the GeoIP API to find my coordinates, but it was not cooperating with me. I kept getting a 502 Error. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HakYCmM7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z42kz4nflxm6ds8x8yv6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HakYCmM7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z42kz4nflxm6ds8x8yv6.png" alt="Image description" width="880" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After failing to find a solution, I decided to use another API and stumbled across &lt;a href="https://ip-api.com/docs/api:json#test"&gt;ip-api&lt;/a&gt;. Similar to GEOIP, its response contained location data. It was neat that this API automatically found my IP address and used it to locate my coordinates. &lt;/p&gt;

&lt;p&gt;These are the information returned in json format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{"status":"success","country":"United States","countryCode":"US","region":"PA","regionName":"Pennsylvania","city":"Williamsport","zip":"17701","lat":41.2382,"lon":-76.9978,"timezone":"America/New_York","isp":"Comcast Cable Communications, LLC","org":"Comcast IP Services, L.L.C.","as":"AS7922 Comcast Cable Communications, LLC","query":"73.230.71.189"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, to fully understand this assignment, I needed to incorporate what I had in my second lab. Luckily, ip-api had an option for developers to manually input an IP address.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FhQAvkG5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hsdhqixsw4ah85xj5w4f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FhQAvkG5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hsdhqixsw4ah85xj5w4f.png" alt="Image description" width="367" height="32"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the getGEOIPData() function, an instance of UserIP(named IPClass) was created. Next, using IPClass's updateUser() function, my IP address can be returned. In fetch, both the locationEndpoint url("&lt;a href="http://ip-api.com/json/%22"&gt;http://ip-api.com/json/"&lt;/a&gt;) and my IP address is combined. ip-api will then use this information to respond with my location data. I was able to plug this information into the Google Maps URL and the wikipedia-query element. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CTfAjXpf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/294c2608kwxeuqba8cb8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CTfAjXpf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/294c2608kwxeuqba8cb8.png" alt="Image description" width="548" height="444"&gt;&lt;/a&gt; &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0SG-okCt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhg1s8yd8x2fyfdpgma3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0SG-okCt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uhg1s8yd8x2fyfdpgma3.png" alt="Image description" width="880" height="232"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;&lt;br&gt;
This is how my website looked like when everything worked!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dp4icptX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0eqpjy6oswyjhv6zebj6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dp4icptX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0eqpjy6oswyjhv6zebj6.png" alt="Image description" width="880" height="433"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/jfz5219/ip-project"&gt;My GitHub Source Code&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://ip-api.com/docs/api:json#test"&gt;ip-api API&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://codepen.io/btopro/pen/yLNmVbw"&gt;wikipedia-query Element&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>forschoolassignment</category>
      <category>lab3</category>
    </item>
    <item>
      <title>Discovering LIT</title>
      <dc:creator>jfz5219</dc:creator>
      <pubDate>Mon, 17 Jan 2022 04:59:48 +0000</pubDate>
      <link>https://dev.to/jfz5219/discovering-lit-egg</link>
      <guid>https://dev.to/jfz5219/discovering-lit-egg</guid>
      <description>&lt;p&gt;I thought I knew some basics of Javascript and CSS, but I was wrong. To begin, I'm writing this blog for one of my IST lab assignments. I first had to complete a list of thing.&lt;/p&gt;

&lt;p&gt;List:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download VSCode, NPM, and NodeJS&lt;/li&gt;
&lt;li&gt;Create GitHub account&lt;/li&gt;
&lt;li&gt;Link SSH&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;NPM is important because it provides tools that Node.js files may need. It also helps us interact with and create repos.&lt;/p&gt;

&lt;p&gt;I already had VSCode and NPM, so all I needed was NodeJS. To download NodeJS, I search type it into Google and clicked the first link. I wanted to download the the recommended version and stuck with Ver. 16.13.2.&lt;/p&gt;

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

&lt;p&gt;I had a GitHub account and just needed to create a repository for this lab assignment. Then, I went on a tangent on what a SSH was and how to find my keys. I ended up using this &lt;a href="https://medium.com/devops-with-valentine/2021-how-to-set-up-your-ssh-key-for-github-on-windows-10-afe6e729a3c0"&gt;tutorial&lt;/a&gt; on setting up my SSH keys for GitHub. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hknC_0-a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mrl2lb57m4k6suvuof5r.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hknC_0-a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mrl2lb57m4k6suvuof5r.JPG" alt="Image description" width="847" height="659"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With everything installed and ready I ran over the LIT tutorials provided by our professor. This was when I realized I knew nothing about Javascript. The tutorial started off easy, but got harder as more components came together. I was kinda lost at the last page of the tutorial, but I think it was enough for me to complete the lab. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lab 1: Create a Hello World Element&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I looked over the simple sample code given to us as a reference and documented what I understood and didn't. Deleting and checking what the code would produce helped me understand some components. After studying the code, I renamed all the element components to "Hello World". I knew I was correct once it produced the same results as the sample code. However, all of this was done in the LIT tutorial website, I still had to run my code using NPM. In the end, I couldn't completely finish the assignment because it didn't run and I had errors. I'm still trying to figure out what happened and if there's no result, I will head to my classmates, professor, or TAs for help.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Yg81SZW_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/874qwtzsl2krnbnxyjme.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Yg81SZW_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/874qwtzsl2krnbnxyjme.JPG" alt="Image description" width="880" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update Jan 19&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With the help of some of my classmates, I was able to figure out what went wrong. I should have looked over the professors &lt;a href="https://www.youtube.com/watch?v=r_mio0e6v1g"&gt;tutorial&lt;/a&gt; because I completely skipped over some steps for the "open-wc". Once everything was installed, then I could run "npm start".&lt;/p&gt;

&lt;p&gt;I still came across some errors after running my code and I'll go over some of them. &lt;/p&gt;

&lt;p&gt;First, my "HelloWorld" class was not capitalized so it looked like this (picture below).&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EzA82iX1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/92buki69hbsleoa6fb7p.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EzA82iX1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/92buki69hbsleoa6fb7p.JPG" alt="Image description" width="371" height="28"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Second, I did not import the source correctly. I should have added two dots to get to my hello-world.js directory, instead I only had one.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jzOeTfo5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4us7nbs1oqgtv9w1s98l.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jzOeTfo5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4us7nbs1oqgtv9w1s98l.JPG" alt="Image description" width="449" height="17"&gt;&lt;/a&gt;(WRONG, it should be src="../hello-world.js")&lt;/p&gt;

&lt;p&gt;After patching up everything and running "npm start", the outcome looked like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AaUjpoJY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eefj8vflurxb5lfqyk10.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AaUjpoJY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eefj8vflurxb5lfqyk10.JPG" alt="Image description" width="420" height="195"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can check out my code on &lt;a href="https://github.com/jfz5219/ist402"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
