<?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: ˗ˏˋ Akash ˊˎ˗</title>
    <description>The latest articles on DEV Community by ˗ˏˋ Akash ˊˎ˗ (@akashtdev).</description>
    <link>https://dev.to/akashtdev</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%2F1774686%2Feac1cb43-174d-4e58-ab2b-a6787c92c3eb.JPG</url>
      <title>DEV Community: ˗ˏˋ Akash ˊˎ˗</title>
      <link>https://dev.to/akashtdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/akashtdev"/>
    <language>en</language>
    <item>
      <title>What is localhost 3000?</title>
      <dc:creator>˗ˏˋ Akash ˊˎ˗</dc:creator>
      <pubDate>Sun, 25 Aug 2024 18:05:22 +0000</pubDate>
      <link>https://dev.to/akashtdev/what-is-localhost-3000-2d1g</link>
      <guid>https://dev.to/akashtdev/what-is-localhost-3000-2d1g</guid>
      <description>&lt;p&gt;&lt;strong&gt;👋 DEVs!&lt;/strong&gt; If you're diving into web development, you've probably come across the term "localhost." It might sound technical, but it's an essential concept that every developer should understand. In this post, I'll break down what localhost is, how it fits into web development, and how you can move from local development to sharing your work on the internet. Let's dive in!&lt;/p&gt;

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

&lt;p&gt;Before we get into localhost, let's start with the basics of hosting.&lt;/p&gt;

&lt;p&gt;Hosting is like renting space on the internet for your website. Here's a quick overview of the different types of hosting:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Shared Hosting:&lt;/strong&gt; Multiple websites share the same server resources. It's like living in an apartment building.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- VPS Hosting:&lt;/strong&gt; Virtual Private Servers give you a dedicated portion of server resources, similar to a townhouse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Dedicated Hosting:&lt;/strong&gt; You get the entire server to yourself, like owning a house.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Cloud Hosting:&lt;/strong&gt; Your website's data is spread across multiple servers, offering scalability and reliability, like living in a city where different parts support each other.&lt;/p&gt;

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

&lt;p&gt;Localhost is your own personal private web server on your computer. When you're developing a website, you don't want to make changes directly on the live site. Instead, you run the site on your machine first to test things out. The IP address for localhost is always &lt;strong&gt;&lt;em&gt;127.0.0.1&lt;/em&gt;&lt;/strong&gt;, which points back to your computer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fa3htij210a8csde3k2t3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fa3htij210a8csde3k2t3.png" alt="THERE'S NO PLACE LIKE 127.0.0.1" width="413" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me tell you a funny story, My friend was working on some logos for our project. He wanted our opinions, so he sent us links to check them out. But instead of using a proper server, he shared localhost links! Of course, none of us could see the logos because those links only worked on his computer. We all had a good laugh about it 😂, but it was a great learning moment about the importance of proper hosting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Local Hosting with Python
&lt;/h2&gt;

&lt;p&gt;One of the easiest ways to host files locally is by using Python's built-in HTTP server. Here's how you can do it:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Navigate to Your Project Directory:
&lt;/h3&gt;

&lt;p&gt;Open your terminal and navigate to the directory containing your website files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd path/to/your/project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Start the Local Server:
&lt;/h3&gt;

&lt;p&gt;Make sure you have Python 3 installed on your machine.&lt;br&gt;
Run the following command to start a simple HTTP server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python3 -m http.server 8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Access Your Local Site:
&lt;/h3&gt;

&lt;p&gt;Open your web browser and go to &lt;code&gt;http://localhost:8080&lt;/code&gt;. You should see your website running locally.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sharing Your Localhost with Ngrok
&lt;/h2&gt;

&lt;p&gt;Sometimes, you need to share your local development with others without deploying it to a live server. Ngrok is a fantastic tool for this. Here's how you can set it up:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Download and Install Ngrok:
&lt;/h3&gt;

&lt;p&gt;Download Ngrok from &lt;code&gt;ngrok.com&lt;/code&gt; and install it.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Expose Your Local Server:
&lt;/h3&gt;

&lt;p&gt;Run your local server (as shown above), then open another terminal and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ngrok http 8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.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%2Foz1uz7o9xfvvktqkmdcy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Foz1uz7o9xfvvktqkmdcy.png" alt="macos-config-forngrok" width="800" height="689"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, 8080 is the port your local server is using. Modify this if you are hosting on a different port.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Share the Public URL:
&lt;/h3&gt;

&lt;p&gt;Ngrok will provide a public URL that tunnels to your local server. Share this URL with others, and they can access your local site.&lt;/p&gt;

&lt;h2&gt;
  
  
  General Web Hosting for Projects
&lt;/h2&gt;

&lt;p&gt;When you're ready to make your project available to the world, you need to host it on an internet server. In real-world projects, you typically need to purchase a domain name and set up DNS (Domain Name System) to map your domain name to your website's IP address. This makes your site accessible via a human-readable address like &lt;a href="http://www.akasht.dev" rel="noopener noreferrer"&gt;www.akasht.dev&lt;/a&gt;.&lt;br&gt;
Here are some popular hosting providers that can help you get your project online:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• AWS (Amazon Web Services):&lt;/strong&gt; Offers a range of hosting options, from simple static website hosting to complex application hosting with services like EC2, S3, and Elastic Beanstalk. AWS provides a highly scalable and reliable infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Vercel:&lt;/strong&gt; Specializes in hosting modern web applications with a focus on performance and ease of use. It's particularly great for frameworks like Next.js and supports features like serverless functions and edge caching.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Netlify:&lt;/strong&gt; Provides an easy way to deploy static sites and serverless functions. Netlify offers integrated CI/CD, custom domains, SSL, and powerful build tools that streamline the development and deployment process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;• Heroku:&lt;/strong&gt; A cloud platform that allows you to build, run, and operate applications entirely in the cloud. It supports multiple programming languages and offers features like managed databases, monitoring, and scaling.&lt;/p&gt;

&lt;p&gt;These platforms offer various tools and integrations to streamline the deployment process, making it easier to get your project online and accessible to users worldwide.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Understanding localhost and how to move your projects to internet hosting is crucial for any budding web developer. It's all part of the process of taking your work from your personal workspace to the world stage. And remember, sharing localhost links is a rookie mistake we all laugh about later.&lt;/p&gt;

&lt;p&gt;To dive deeper into what the internet is and how it works, check out my blog '&lt;a href="https://dev.to/akashtdev/unveiling-the-magic-of-the-internet-16d3"&gt;&lt;em&gt;&lt;strong&gt;Unveiling the Magic of the Internet&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;' I wrote earlier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Happy coding! 🧑🏽‍💻
&lt;/h3&gt;

</description>
    </item>
    <item>
      <title>Unveiling the Magic of the Internet</title>
      <dc:creator>˗ˏˋ Akash ˊˎ˗</dc:creator>
      <pubDate>Sat, 10 Aug 2024 00:20:56 +0000</pubDate>
      <link>https://dev.to/akashtdev/unveiling-the-magic-of-the-internet-16d3</link>
      <guid>https://dev.to/akashtdev/unveiling-the-magic-of-the-internet-16d3</guid>
      <description>&lt;p&gt;&lt;strong&gt;👋 DEVs!&lt;/strong&gt; Ever wondered how you're able to watch those hilarious cat videos, check your social media, or order a pizza without moving an inch? The magic behind all of this is the internet. Today, we're going to explore this fascinating world together, and trust me, it's going to be a fun ride!&lt;/p&gt;

&lt;h2&gt;
  
  
  How It All Began
&lt;/h2&gt;

&lt;p&gt;Let's hop into our virtual time machine and set the dial to the 1960s. A room full of giant computers and a group of brilliant minds from the US Department of Defense. They were working on ARPANET, the ancestor of the internet, trying to create a network that could survive any disaster.&lt;/p&gt;

&lt;p&gt;Fast forward to 1991, and we meet Tim Berners-Lee, the genius who invented the World Wide Web. He gave us the ability to share information across the globe with just a click. And just like that, the internet as we know it was born.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Internet Really Is?
&lt;/h2&gt;

&lt;p&gt;At its core, the Internet is a collection of interconnected networks. Think of each network as a cluster of computers or nodes linked by fiber optic cables. In a broader vision, the internet is a cluster of all computers around the globe connected to each other with high-speed fiber optic cables laid by private companies and governments. These cables span oceans and connect continents, making global communication possible.&lt;/p&gt;

&lt;p&gt;You can even see a live map of these cables on the Submarine Cable Map website, which shows how these cables stretch across the globe.&lt;/p&gt;

&lt;p&gt;In this vast network, there are two main players: servers and clients. A server is nothing but a normal computer in the network, but unlike a regular computer, servers operate on a larger scale and are available 24/7 to respond to requests. When you browse a website, your computer (the client) fetches data from a server, allowing you to view the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F7j2d1jhnvj46muxqx91o.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F7j2d1jhnvj46muxqx91o.gif" alt="An animated GIF showing a hand holding a black card with the word 'INTERNET' printed in vibrant, glitchy 3D letters. The card's design emphasizes the digital and interconnected nature of the internet." width="706" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Blocks of the Internet
&lt;/h2&gt;

&lt;h3&gt;
  
  
  IP Address — The Internet Protocol
&lt;/h3&gt;

&lt;p&gt;Every device connected to the internet has a unique identifier called an IP address. Think of it as your computer's digital address. It ensures that data knows where to go and how to get back to you, preventing a chaotic mess of lost information.&lt;/p&gt;

&lt;h3&gt;
  
  
  DNS — The Domain Name System
&lt;/h3&gt;

&lt;p&gt;DNS is like the contacts saved in your phone. It translates human-friendly web addresses like "google.com" into IP addresses like "142.250.182.142," which the computers understand. DNS saves you from typing long strings of numbers every time you want to visit a website. To find a website's IP address, you can use the ping command followed by the website's domain name. For example, typing "ping google.com" in the terminal will display the IP address associated with "google.com."&lt;/p&gt;

&lt;h3&gt;
  
  
  ISPs — The Internet Service Provider
&lt;/h3&gt;

&lt;p&gt;ISPs are your ticket to the digital city. Companies like AT&amp;amp;T, Hathway, ACT, or Verizon provide you access to the internet for a fee, ensuring you stay connected to this vast network of information.&lt;/p&gt;

&lt;h3&gt;
  
  
  HTTP/HTTPS — The Hypertext Transfer Protocol
&lt;/h3&gt;

&lt;p&gt;When you type a URL into your browser, you're using HTTP or its secure sibling HTTPS. These protocols define how messages are formatted and transmitted, and how web servers and browsers should respond to various commands. HTTPS adds a layer of encryption to keep your data safe from prying eyes.&lt;/p&gt;

&lt;h3&gt;
  
  
  TCP/IP — Transmission Control Protocol / Internet Protocol
&lt;/h3&gt;

&lt;p&gt;TCP and IP are the foundational protocols of the Internet. TCP ensures reliable communication between devices by breaking data into packets and reassembling them at the destination. IP handles addressing and routing these packets to ensure they reach the correct destination.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Magic of the Internet
&lt;/h2&gt;

&lt;p&gt;When you type a URL into your browser, your device sends a request to your Internet Service Provider (ISP). The ISP connects you to the internet and forwards your request to the Domain Name System (DNS), which translates the website name into an IP address.&lt;/p&gt;

&lt;p&gt;With the IP address in hand, your request travels through multiple routers. These routers act like traffic managers, directing the data toward its destination. When the request reaches the server hosting the website, the server processes it and sends back the necessary data for the webpage.&lt;/p&gt;

&lt;p&gt;The returning data retraces the path through the routers, traveling back through the network to your device. Your browser then interprets the data it receives. This data typically includes HTML, which provides the structure of the webpage. The browser parses the HTML and uses it to render the content on your screen, displaying the website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fmb1j6xaox6n4vc7moyeq.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fmb1j6xaox6n4vc7moyeq.gif" alt="A still image from the movie 'Zoolander,' featuring Owen Wilson's character holding up a light with a captivated expression. The caption reads, 'IT'S SO SIMPLE,' emphasizing the ease or simplicity of something being discussed." width="600" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Exploring the inner workings of the internet reveals just how extraordinary this technology truly is. From the early days of ARPANET to the vast network of fiber optic cables connecting the world today, the internet has transformed our lives in countless ways. Whether you're watching cat videos, connecting with friends on social media, or ordering a pizza, it's all thanks to this complex and fascinating system.&lt;/p&gt;

&lt;p&gt;Now that you have a glimpse of how it all works, you'll hopefully have a deeper appreciation for the magic that happens every time you go online.&lt;/p&gt;

&lt;p&gt;Happy browsing! 🌐&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>internet</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
