<?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: Ankit Sinha</title>
    <description>The latest articles on DEV Community by Ankit Sinha (@theankitsinha).</description>
    <link>https://dev.to/theankitsinha</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%2F408139%2F9fa419d0-bf04-4027-8654-2a4c53de0180.png</url>
      <title>DEV Community: Ankit Sinha</title>
      <link>https://dev.to/theankitsinha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/theankitsinha"/>
    <language>en</language>
    <item>
      <title>Navigating Laravel's Journey with Vercel and PlanetScale</title>
      <dc:creator>Ankit Sinha</dc:creator>
      <pubDate>Wed, 22 Nov 2023 10:35:07 +0000</pubDate>
      <link>https://dev.to/theankitsinha/unleashing-laravel-a-stellar-voyage-into-vercel-deployment-magic-3603</link>
      <guid>https://dev.to/theankitsinha/unleashing-laravel-a-stellar-voyage-into-vercel-deployment-magic-3603</guid>
      <description>&lt;p&gt;In the ever-expanding cosmos of development tools, Laravel stands out as my trusted comet, swiftly cutting through the vastness of code. However, for my smaller projects, I sought a deployment solution that was not just cost-effective but also a breeze to set up&lt;/p&gt;

&lt;p&gt;Here is my step-by-step guide on how to deploy Laravel applications on Vercel with a PlanetScale database (MySql):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new Laravel application.&lt;/li&gt;
&lt;li&gt;Configure the application for Vercel.&lt;/li&gt;
&lt;li&gt;Set up a PlanetScale database.&lt;/li&gt;
&lt;li&gt;Configure vervel with Environment Variables&lt;/li&gt;
&lt;li&gt;Automate the deployment process using Github Actions.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, let's sprinkle some creativity into your step-by-step guide:&lt;/p&gt;

&lt;h2&gt;
  
  
  🌌 Step 1: Creating a Laravel Constellation
&lt;/h2&gt;

&lt;p&gt;We require an application for deployment. Let's swiftly conjure a new Laravel + Jetstream project—a constellation of code and creativity.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Create a new Laravel project 
composer create-project laravel/laravel laravel-vercel-example

# Install Jetstream
composer require laravel/jetstream
php artisan jetstream:install livewire
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we'll set up a local database using Docker Compose, update our environment variables, and run our migrations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# docker-compose.yml
version: '3.8'

services:
  db:
    image: mysql:8.0
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
      MYSQL_DATABASE: laravel
      MYSQL_ROOT_PASSWORD: password
    ports:
      - "3306:3306"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, We need to update our &lt;code&gt;.env&lt;/code&gt; file in our project&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db
DB_USERNAME=root
DB_PASSWORD=password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, Once we had completed this, lets boot up db and migrate our base laravel tables,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Start our database
docker-compose up -d

# Run migrations
php artisan migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now Create a project in Github and Push this project excluding your env files to Github, as we will be using github action to automatic deploy this application in vercel.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Step 2: Configuring the Vercel
&lt;/h2&gt;

&lt;p&gt;Before deploying our application to Vercel, we need to make some changes,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Set up a new Vercel project&lt;/li&gt;
&lt;li&gt;Create a vercel.json file&lt;/li&gt;
&lt;li&gt;Add our api/index.php entry point&lt;/li&gt;
&lt;li&gt;Set up our trusted proxies&lt;/li&gt;
&lt;li&gt;Ensure the vendor directory is not uploaded&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 1. Setup a new Vecel project
&lt;/h3&gt;

&lt;p&gt;We'll use the Vercel CLI to create a new project, which we plan to deploy later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Install the Vercel CLI
npm i -g vercel

# Login to Vercel
vercel login

# Create and link a new project
vercel link

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

&lt;/div&gt;



&lt;p&gt;Follow the step-by-step instructions provided by vercel login and vercel link. This will generate a &lt;code&gt;.vercel&lt;/code&gt; directory and automatically include it in your &lt;code&gt;.gitignore&lt;/code&gt;. &lt;br&gt;
Open the &lt;code&gt;.vercel/project.json&lt;/code&gt; file and take note of the orgId and projectId as we'll need them later.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 2. Create a vercel.json file
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// vercel.json
{
    "version": 2,
    "framework": null,
    "functions": {
        "api/index.php": { "runtime": "vercel-php@0.6.0" }
    },
    "outputDirectory": "public",
    "routes": [
        {
            "src": "/build/(.*)",
            "dest": "/build/$1"
        },
        {
            "src": "/(.*)",
            "dest": "/api/index.php"
        }
    ],
    "env": {
        "APP_ENV": "production",
        "APP_DEBUG": "true",
        "APP_URL": "YOUR APP URL",

        "APP_CONFIG_CACHE": "/tmp/config.php",
        "APP_EVENTS_CACHE": "/tmp/events.php",
        "APP_PACKAGES_CACHE": "/tmp/packages.php",
        "APP_ROUTES_CACHE": "/tmp/routes.php",
        "APP_SERVICES_CACHE": "/tmp/services.php",
        "VIEW_COMPILED_PATH": "/tmp",

        "CACHE_DRIVER": "array",
        "LOG_CHANNEL": "stderr",
        "SESSION_DRIVER": "cookie",

        "DB_CONNECTION": "mysql",
        "DB_PORT": "3306",
        "MYSQL_ATTR_SSL_CA": "/etc/pki/tls/certs/ca-bundle.crt"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Do change runtime if using another version of PhP: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="mailto:vercel-php@0.6.0"&gt;vercel-php@0.6.0&lt;/a&gt; - PHP 8.2.x (&lt;a href="https://example-php-8-2.vercel.app"&gt;https://example-php-8-2.vercel.app&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;a href="mailto:vercel-php@0.5.3"&gt;vercel-php@0.5.3&lt;/a&gt; - PHP 8.1.x (&lt;a href="https://example-php-8-1.vercel.app"&gt;https://example-php-8-1.vercel.app&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;a href="mailto:vercel-php@0.4.1"&gt;vercel-php@0.4.1&lt;/a&gt; - PHP 8.0.x (&lt;a href="https://example-php-8-0.vercel.app"&gt;https://example-php-8-0.vercel.app&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;a href="mailto:vercel-php@0.3.3"&gt;vercel-php@0.3.3&lt;/a&gt; - PHP 7.4.x (&lt;a href="https://example-php-7-4.vercel.app"&gt;https://example-php-7-4.vercel.app&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s quickly explain some of the key concepts here.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;functions&lt;/code&gt;
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"functions": {
      "api/index.php": { "runtime": "vercel-php@0.6.0" }
  },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Our application is essentially a single serverless function, which we'll create next. We use the community &lt;a href="https://github.com/vercel-community/php"&gt;vercel-php&lt;/a&gt; runtime to set up the environment and automatically install dependencies with Composer.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;outputDirectory&lt;/code&gt;
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"outputDirectory": "public",
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Vercel builds our application by running npm run build, but by default, it looks for a dist directory. However, our assets are actually saved in public/build, so we need to instruct Vercel where to find them.&lt;/p&gt;

&lt;p&gt;If you're using a tool other than Livewire, you may need to adjust this setting accordingly.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;routes&lt;/code&gt;
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"routes": [
    {
        "src": "/build/(.*)",
        "dest": "/build/$1"
    },
    {
        "src": "/(.*)",
        "dest": "/api/index.php"
    }
],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The first route intercepts requests for CSS and JS assets and directs them to the appropriate files. All other requests are managed by our Laravel serverless function, as specified by the second route.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;code&gt;env&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;"env": {&lt;br&gt;
    "APP_ENV": "production",&lt;br&gt;
    "APP_DEBUG": "true",&lt;br&gt;
    "APP_URL": "YOUR APP URL",&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"APP_CONFIG_CACHE": "/tmp/config.php",
"APP_EVENTS_CACHE": "/tmp/events.php",
"APP_PACKAGES_CACHE": "/tmp/packages.php",
"APP_ROUTES_CACHE": "/tmp/routes.php",
"APP_SERVICES_CACHE": "/tmp/services.php",
"VIEW_COMPILED_PATH": "/tmp",

"CACHE_DRIVER": "array",
"LOG_CHANNEL": "stderr",
"SESSION_DRIVER": "cookie",

"DB_CONNECTION": "mysql",
"DB_PORT": "3306",
"MYSQL_ATTR_SSL_CA": "/etc/pki/tls/certs/ca-bundle.crt"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;}&lt;br&gt;
Here, we establish our non-secret environment variables. Take note of the &lt;code&gt;MYSQL_ATTR_SSL_CA&lt;/code&gt; variable. This is crucial for a secure connection to PlanetScale in the following steps. We will set up our secret environment variables in the Vercel dashboard later on.&lt;/p&gt;
&lt;h3&gt;
  
  
  🎭 Step 3. Add our &lt;code&gt;api/index.php&lt;/code&gt; entry point
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// api/index.php
&amp;lt;?php

require __DIR__ . '/../public/index.php';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This simple file redirects to the default index.php file provided by Laravel. This is necessary because Vercel only allows functions to be located in the api directory.&lt;/p&gt;
&lt;h3&gt;
  
  
  🛡️ Step 4. Set up our trusted proxies
&lt;/h3&gt;

&lt;p&gt;Vercel hosts our code behind a load balancer, which forwards requests to port &lt;code&gt;80&lt;/code&gt;. This can confuse Laravel when it generates secure links. To solve this issue, we need to make a simple modification to &lt;code&gt;TrustProxies.php&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// app/Http/Middleware/TrustProxies.php
&amp;lt;?php

namespace App\Http\Middleware;

use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;

class TrustProxies extends Middleware
{
    /**
     * The trusted proxies for this application.
     *
     * @var array&amp;lt;int, string&amp;gt;|string|null
     */
    protected $proxies = '*';

    /**
     * The headers that should be used to detect proxies.
     *
     * @var int
     */
    protected $headers =
        Request::HEADER_X_FORWARDED_FOR |
        Request::HEADER_X_FORWARDED_HOST |
        Request::HEADER_X_FORWARDED_PORT |
        Request::HEADER_X_FORWARDED_PROTO |
        Request::HEADER_X_FORWARDED_AWS_ELB;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🚫 Step 5. Ensure the vendor directory is not uploaded
&lt;/h3&gt;

&lt;p&gt;Lastly, we need to add a &lt;code&gt;.vercelignore file&lt;/code&gt;. This will prevent our vendor (created during composer installation) and any pre-built files from being included, as Vercel will build these for us.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# .vercelignore
/vendor
/public/build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🪐 Step 3. Set up a PlanetScale database.
&lt;/h2&gt;

&lt;p&gt;Visit &lt;a href="https://planetscale.com/"&gt;PlanetScale&lt;/a&gt; and create an account if you haven't already. From the dashboard, create a new database.&lt;/p&gt;

&lt;p&gt;Once your database is operational, click on "Connect". Generate a new password and record the configuration details.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌐 Step 4. Configure vervel with Environment Variables
&lt;/h2&gt;

&lt;p&gt;Now we'll add those configuration details to Vercel. This will allow our deployed application to access the database. Go to the dashboard and add the following environment variables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;APP_KEY&lt;/code&gt; &lt;em&gt;which can be generated by running&lt;/em&gt; &lt;code&gt;php artisan key:generate&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DB_HOST&lt;/code&gt; &lt;em&gt;From PlanetScale Database Dashboard&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DB_DATABASE&lt;/code&gt; &lt;em&gt;From PlanetScale Database Dashboard&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DB_USERNAME&lt;/code&gt; &lt;em&gt;From PlanetScale Database Dashboard&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DB_PASSWORD&lt;/code&gt; &lt;em&gt;From PlanetScale Database Dashboard&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🚀 Step 5. Automated deployment with Github Actions
&lt;/h2&gt;

&lt;p&gt;Now, we can integrate everything with Github Actions. We will set up a workflow that automatically applies migrations to PlanetScale and deploys our application to Vercel.&lt;/p&gt;

&lt;p&gt;To start, add the following &lt;code&gt;.github/workflows/main.yaml&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;on:
    push:
        branches: main
jobs:
    deploy:
        name: Deploy
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v3

            - name: Setup PHP
              uses: shivammathur/setup-php@v2
              with:
                php-version: '8.2'

            - name: Install Vercel CLI
              run: npm install --global vercel@latest

            - name: Install Dependencies
              run: composer install

            - name: Migrate DB
              run: |
                php artisan migrate --force
              env:
                APP_ENV: production
                DB_CONNECTION: mysql
                DB_HOST: ${{ secrets.DB_HOST }}
                DB_PORT: 3306
                DB_DATABASE: ${{ secrets.DB_DATABASE }}
                DB_USERNAME: ${{ secrets.DB_USERNAME }}
                DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
                MYSQL_ATTR_SSL_CA: /etc/ssl/certs/ca-certificates.crt

            - name: Deploy to Vercel
              run: vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }}
              env:
                VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
                VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, add the following secrets to your Github dashboard:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;From PlanetScale:&lt;/em&gt;&lt;br&gt;
&lt;code&gt;DB_HOST&lt;/code&gt;&lt;br&gt;
&lt;code&gt;DB_DATABASE&lt;/code&gt;&lt;br&gt;
&lt;code&gt;DB_USERNAME&lt;/code&gt;&lt;br&gt;
&lt;code&gt;DB_PASSWORD&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;From .vercel/project.json:&lt;/em&gt;&lt;br&gt;
&lt;code&gt;VERCEL_ORG_ID&lt;/code&gt;&lt;br&gt;
&lt;code&gt;VERCEL_PROJECT_ID&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;From Vercel settings page:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://vercel.com/account/tokens"&gt;&lt;code&gt;VERCEL_TOKEN&lt;/code&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, with secrets in place, every push to the main branch triggers a symphony of actions—installing dependencies, running migrations, and deploying our Laravel creation to Vercel.&lt;/p&gt;

&lt;p&gt;Finally, push everything to Github.&lt;/p&gt;

&lt;p&gt;Let’s take a closer look at what this workflow is doing:&lt;/p&gt;

&lt;p&gt;Your code will be checked out.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A PHP environment will be set up, giving you access to php and composer.&lt;/li&gt;
&lt;li&gt;The Vercel CLI will be installed.&lt;/li&gt;
&lt;li&gt;Your application dependencies will be installed.&lt;/li&gt;
&lt;li&gt;Migrations will be run with &lt;code&gt;php artisan migrate --force&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Your application will be deployed to Vercel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You should now have a deployed and functioning application!&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>vercel</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>The Ultimate Guide To Building A Personal Website</title>
      <dc:creator>Ankit Sinha</dc:creator>
      <pubDate>Sun, 28 Jun 2020 10:16:13 +0000</pubDate>
      <link>https://dev.to/theankitsinha/the-ultimate-guide-to-building-a-personal-website-1g75</link>
      <guid>https://dev.to/theankitsinha/the-ultimate-guide-to-building-a-personal-website-1g75</guid>
      <description>&lt;p&gt;What’s the #1 networking tool you can have in your arsenal as a student or a professional? I’ll tell you this right now: &lt;strong&gt;it isn’t your resume&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Resumes are boring. College and career experts will tell you to make your resume of one page, size 12 Time New Roman document printed in black and white with no pictures. &lt;br&gt;
Seriously? How are you supposed to represent and differentiate yourself with that? &lt;/p&gt;

&lt;p&gt;Plus, your resume becomes static and outdated the moment you hand it to someone. You can’t update resumes you’ve already given out – you have to make new copies.&lt;/p&gt;

&lt;p&gt;That’s why you need to create a personal website.&lt;/p&gt;

&lt;p&gt;A website is the complete opposite of a resume. Everything bad about resumes can be fixed simply by having a website. I’d go as far as to say that not having a website in 2020 is like shooting yourself in the foot – it’s that useful.&lt;/p&gt;

&lt;p&gt;Plus, having a &lt;strong&gt;website makes you more findable.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's get this straight!&lt;br&gt;
Nowadays anyone and everyone can build a website, be it coming from a coding background or not,&lt;br&gt;
There are many online website builders which are purely dragged and drop and don't require almost any knowledge of coding like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://wordpress.com/"&gt;Wordpress&lt;/a&gt;- Which basically works on themes, and there are many free themes for every genre, its petty simple drag and drop thing. Combined with various plugins like Elementor builder it's very easy to make a website.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.wix.com/"&gt;Wix&lt;/a&gt;- Wix offers an excellent drag-and-drop site builder to create small websites. There are 100s of free templates available. Wix provides its own web hosting as well as domain names (free and paid). The App Market makes it easy to add extra functionality such as photo galleries or e-commerce.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also,&lt;br&gt;
If you have a little knowledge of coding you can refer any of the frontend frameworks for building your website &lt;br&gt;
(&lt;a href="https://dev.to/theankitsinha/what-is-a-web-framework-and-which-one-you-should-use-hnb"&gt;Which one you should use&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Now comes the part How much I should pay?&lt;br&gt;
Mostly new developers have a small budget. Lucky you, this blog is budgeted for anywhere from nothing to 25 USD.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What all you need?&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Domain&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The first step to building your personal site is to choose how you’re going to have it hosted. There are several ways to put up a website. For instance, you could just create a free blog at Wix or WordPress.com.&lt;/p&gt;

&lt;p&gt;However, I believe it’s a lot more impressive to have a self-hosted site with an actual domain name (not a subdomain). This will look a lot more legitimate and will show that you’ve taken the time to learn how to build a website, which can differentiate you from the crowd.&lt;br&gt;
What makes a good domain name?&lt;br&gt;
For a personal website or portfolio, I’d recommend making your domain name your &lt;strong&gt;first name+ your last name.com.&lt;/strong&gt;  That’s seriously the best option for memorability and SEO (aka how high you show up in Google which searched).&lt;/p&gt;

&lt;h4&gt;
  
  
  Domain Registrars:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.freenom.com/"&gt;Freenom&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Domain Extensions - .tk,.ml,cf&lt;/li&gt;
&lt;li&gt;Free Domain for 1 year&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://www.namecheap.com/"&gt;Namecheap&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Domain Extensions - .in,.com,org,etc&lt;/li&gt;
&lt;li&gt;Price range 1$- 10$&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://www.namecheap.com/"&gt;Namecheap&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Domain Extensions - .in,.com,org,etc&lt;/li&gt;
&lt;li&gt;Price range 1$- 10$&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://www.hostinger.in/"&gt;Hostinger&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Domain Extensions - .in,.com,org,etc&lt;/li&gt;
&lt;li&gt;Price range 1$- 10$&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to get the best deal:&lt;/strong&gt; I would suggest at least watch for three days, the prices of domain vary almost every day, also it might be cheaper at early morning, and if you are buying domain+hosting you can get crazy discount codes, even you can get a free domain when you buy hosting+domain from &lt;a href="https://www.hostinger.in/"&gt;Hostinger&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Website Hosting&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;There are several hosts to pick from, and some are not free.&lt;br&gt;
Hosting a website is placing all your website files on a server where you can access it via IP address or URL.&lt;/p&gt;

&lt;p&gt;After you have hosted your website it's important to change your DNS(Domain name System) in domain provider.&lt;/p&gt;

&lt;h4&gt;
  
  
  Hosting Providers:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://infinityfree.net/"&gt;InfinityFree&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3 free hosting&lt;/li&gt;
&lt;li&gt;Free Hosting for 1 year&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://www.heroku.com/"&gt;Heroku&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3 free hosting&lt;/li&gt;
&lt;li&gt;Free Hosting for 1 year&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://pages.github.com/"&gt;GitHub Pages&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free Hosting&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://www.hostinger.in/"&gt;Hostinger&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Price range 10$- 20$&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://in.godaddy.com/"&gt;Godaddy&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Price range 15$- 20$&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to get the best deal:&lt;/strong&gt; I would recommend if you are going with a paid hosting, Watch for Hostinger hosting usually when purchasing domain+hosting they give lifetime SSL for free.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;SSL&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When purchasing a domain/hosting you can also purchase SSL for like 3$-5$.&lt;br&gt;
But you can also get Free SSL from :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.cloudflare.com/"&gt;Cloudflare&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://letsencrypt.org/"&gt;LetsEncrypt&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For Starting, SSL and Email providers are not required,&lt;br&gt;
But Domain and housing a website is a must!&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Make Your Website Even Better(Optional)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The purpose of this blog was to get you from zero to having a working website as easily as possible. However, you can do so much more to optimize your site’s design, speed, SEO, security, navigation, typography… your options are endless.&lt;/p&gt;

&lt;p&gt;That’s why I want to show you some of the things you can do to take your site to the next level.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Personal Website SEO&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Making Sure You Show Up in Google Searches&lt;/p&gt;

&lt;p&gt;This brings us to the topic of Search Engine Optimization or SEO. Now, I’m going to be honest – SEO can be a complex business. After all, we’re talking about trying to make our websites look good to a mindbogglingly complicated algorithm, which has details that Google keeps closely guarded. Oh, and of course, millions upon millions of other sites are trying to do the same thing.&lt;/p&gt;

&lt;p&gt;The good news is that Google’s algorithm (as well as the algorithms of other search engines) has gotten much, much better over time. Its mission has always been to serve up the most relevant results for what a person searches, and it’s gotten pretty good at doing that.&lt;/p&gt;

&lt;p&gt;It’s also a lot faster at indexing new sites that pop up. when I started building websites, I remember having to manually submit them to search engines and then sometimes wait months to see them show up. Now, Google will index your site automatically – often in just a couple of days.&lt;/p&gt;

&lt;p&gt;What I’m going to recommend is a set of three simple steps, which can each have a big impact:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Have the right content on your site&lt;/li&gt;
&lt;li&gt;Get links from other authoritative and highly-trafficked sites&lt;/li&gt;
&lt;li&gt;Make sure your site is mobile-friendly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s start with your website’s content. The main way that Google figures out what’s on your site – and hence how relevant it is to a person’s search terms – is pretty simple: It reads your site! Google uses small pieces of code called spiders to &lt;strong&gt;“crawl”&lt;/strong&gt; the content of the internet and index it.&lt;/p&gt;

&lt;p&gt;Secondly, you need to understand the role that links from other sites play in your own site’s ranking. To put it simply, your site will rank more highly when it has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Links from a lot of sites (if they’re gotten legitimately – not in paid or spammy ways)&lt;/li&gt;
&lt;li&gt;Links from authoritative sites (typical sites with either a lot of traffic or sites run by institutions like governments or universities)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lastly, I do want to mention that &lt;strong&gt;Google puts a high priority on mobile-friendliness.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;More than 50% of internet traffic now comes from cell phones and mobile devices, and Google has taken notice. &lt;/p&gt;

&lt;p&gt;If you need any help, you can contact me. I’ll either help you directly or point you to people or resources that can be of assistance. &lt;br&gt;
You can also just connect with me on &lt;a href="https://theankitsinha.in/"&gt;theankitsinha.com&lt;/a&gt; without a need for help.&lt;br&gt;
I’d love to meet you! 💓&lt;br&gt;
Also, Do comment if you like this post! And if you have a personal website I would love to have a look! 🌟&lt;/p&gt;

&lt;h2&gt;
  
  
  Good Luck!
&lt;/h2&gt;

</description>
      <category>productivity</category>
      <category>personal</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is a Web Framework, and Which one you should use?</title>
      <dc:creator>Ankit Sinha</dc:creator>
      <pubDate>Fri, 19 Jun 2020 07:37:12 +0000</pubDate>
      <link>https://dev.to/theankitsinha/what-is-a-web-framework-and-which-one-you-should-use-hnb</link>
      <guid>https://dev.to/theankitsinha/what-is-a-web-framework-and-which-one-you-should-use-hnb</guid>
      <description>&lt;p&gt;&lt;strong&gt;Framework&lt;/strong&gt; is a word used a lot in the context of the development cycle.&lt;br&gt;
 So, what even is a framework? &lt;br&gt;
When we talk about frameworks, those frameworks normally fall into three different categories &lt;br&gt;
    1.Frontend Frameworks &lt;br&gt;
    2.Backend Frameworks&lt;br&gt;
    3.User interface frameworks&lt;br&gt;
But even once you know what frameworks are, which one should you learn or use, and why you should use it? So in this blog, we will discuss what is a framework, what frameworks are out there? and how to make decisions about what kind of framework you should use for your projects!&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Frameworks
&lt;/h2&gt;

&lt;p&gt;A framework is a &lt;strong&gt;standardized set of concepts, practices, and criteria for dealing with a common type of problem&lt;/strong&gt;, which can be used as a reference to help us approach and resolve new problems of a similar nature.&lt;br&gt;
In the world of web design &amp;amp; development, to give a more straightforward definition, a framework is defined as a &lt;strong&gt;package made up of a structure of files and folders of standardized code (HTML, CSS, JS documents, etc.&lt;/strong&gt;) which can be used to support the development of websites, as a basis to start building a site.&lt;/p&gt;

&lt;p&gt;If we look at a couple of different web applications we can see that there are a lot of similar features. Many have user authentication, Custom Notifications, Task Scheduling, pages that render on loading, they connect to databases, they have profiles you can look at, they all have stylized feeds of information, etc.&lt;br&gt;
If we want, we can write all of that logic every time we want to build a new application, however, there are also a lot of tools available that can do that for us making our work easier and hence saving a lot of time.&lt;/p&gt;

&lt;p&gt;Also, a lot of the time when we build applications we want to format our code in certain ways that help us become more efficient and help other developers understand our code. Web frameworks help us achieve a structure in our applications, and they give us additional features we can add to them without too much extra work. &lt;/p&gt;

&lt;p&gt;Frameworks give us a place to start so that we can focus on features rather than configuration details.&lt;/p&gt;

&lt;p&gt;Code is read many more times than it is written, and it is so important when you are working with other developers that they know where the code for certain tasks is being written so they can use it in their code.&lt;/p&gt;

&lt;p&gt;For eg. If you use a framework like &lt;a href="https://laravel.com/"&gt;Laravel&lt;/a&gt;, you know all the authentication files are at Auth folder, So any new developer with a basic knowledge of the &lt;a href="https://laravel.com/"&gt;Laravel&lt;/a&gt; framework can easily do any required changes.&lt;/p&gt;

&lt;p&gt;The frameworks also have conventions for how the code is written and structured, which standardizes how the developers write their code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frontend Frameworks
&lt;/h2&gt;

&lt;p&gt;The frontend of a web application is the part you see and interact with. It consists of the web design and the interaction of the site. In terms of programming languages, this is almost always comprised of the CSS, HTML, and JavaScript of the page.&lt;/p&gt;

&lt;h3&gt;
  
  
  The usual components are:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;CSS source code to create a grid: this allows the developer to position the different elements that make up the site design in a simple and versatile fashion.&lt;/li&gt;
&lt;li&gt;Typography style definitions for HTML elements.&lt;/li&gt;
&lt;li&gt;Solutions for cases of browser incompatibility so the site displays correctly in all browsers.&lt;/li&gt;
&lt;li&gt;Creation of standard CSS classes that can be used to style advanced components of the user interface.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Frontend frameworks:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://angular.io/start"&gt;Angular 7+&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built by Google&lt;/li&gt;
&lt;li&gt;Well supported &lt;/li&gt;
&lt;li&gt;Proper Documentation Available&lt;/li&gt;
&lt;li&gt;Encourages reusability&lt;/li&gt;
&lt;li&gt;Improves application scalability&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://reactjs.org/"&gt;React&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built by Facebook&lt;/li&gt;
&lt;li&gt;Bundles frontend code into components &lt;/li&gt;
&lt;li&gt;Proper Documentation Available&lt;/li&gt;
&lt;li&gt;Organizes code and data to make code more reusable&lt;/li&gt;
&lt;li&gt;Large learning curve&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://vuejs.org/"&gt;Vue&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to learn&lt;/li&gt;
&lt;li&gt;Very fast&lt;/li&gt;
&lt;li&gt;Takes parts from Angular and React and optimizes them&lt;/li&gt;
&lt;li&gt;All tools associated with it are packaged well&lt;/li&gt;
&lt;li&gt;less widely adopted than some others&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Choosing a Frontend Framework
&lt;/h3&gt;

&lt;p&gt;The world of frontend frameworks is evolving especially fast, it seems like a new frontend framework is on the rise every few months. Learn what makes sense to you, and don't worry too much about what the "hottest" one at the moment is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Backend Frameworks
&lt;/h2&gt;

&lt;p&gt;Backend frameworks are a lot more varied. They are written in a variety of programming languages and have a wide variety of features.&lt;br&gt;
Below, like the above list, is a very incomplete list of some of the frameworks out there for writing application backends.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://laravel.com/"&gt;Laravel&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Language- Php&lt;/li&gt;
&lt;li&gt;Supports Composer for package management&lt;/li&gt;
&lt;li&gt;Offers tons of packages&lt;/li&gt;
&lt;li&gt;Great community&lt;/li&gt;
&lt;li&gt;Lots of learning resources available for free&lt;/li&gt;
&lt;li&gt;Gives you a lot of functionality out of the box (like user authentication, database connections, and view rendering)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://www.djangoproject.com/"&gt;Django&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Language- Python &lt;/li&gt;
&lt;li&gt;Happy medium between being very opinionated and less structured &lt;/li&gt;
&lt;li&gt;Can be difficult to integrate a fancy front-end.&lt;/li&gt;
&lt;li&gt;Gives you a lot of functionality out of the box (like user authentication, database connections, and view rendering)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://flask.palletsprojects.com/en/1.1.x/"&gt;Flask&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Language- Python &lt;/li&gt;
&lt;li&gt;Less opinionated and more customizable than Django&lt;/li&gt;
&lt;li&gt;Gives you less out of the box (you have to build more)&lt;/li&gt;
&lt;li&gt;All tools associated with it are packaged well&lt;/li&gt;
&lt;li&gt;less widely adopted than some others&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://rubyonrails.org/"&gt;Ruby on Rails&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Language- Ruby &lt;/li&gt;
&lt;li&gt;Very opinionated&lt;/li&gt;
&lt;li&gt;Has great tools like scaffolding so you can build things fast&lt;/li&gt;
&lt;li&gt;Gives you a lot of functionality out of the box (like user authentication, database connections, and view rendering)&lt;/li&gt;
&lt;li&gt;The asset pipeline helps with front-end development&lt;/li&gt;
&lt;li&gt;Ruby takes longer to run programs than some other programming languages&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://www.meteor.com/"&gt;Meteor&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Language- JavaScript &lt;/li&gt;
&lt;li&gt;Gives you a lot of functionality out of the box (like user authentication, database connections, and view rendering)&lt;/li&gt;
&lt;li&gt;Integrates very well with modern front-ends&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://www.gatsbyjs.org/"&gt;GatsbyJS&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Language- JavaScript &lt;/li&gt;
&lt;li&gt;Powered by GraphQL&lt;/li&gt;
&lt;li&gt;Very High Data sources compatibility(directly pull data from Contentful, Drupal, WordPress, etc.)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://expressjs.com/"&gt;Express&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Language- JavaScript &lt;/li&gt;
&lt;li&gt;Very customizable&lt;/li&gt;
&lt;li&gt;Very lightweight&lt;/li&gt;
&lt;li&gt;Less built-in features&lt;/li&gt;
&lt;li&gt;Node is very fast&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Choosing a Backend Framework
&lt;/h3&gt;

&lt;p&gt;Usually, you choose a backend framework based on the programming language it is written in. Also, take into account what features you want to add, if you want authentication (or user login) for your website, for example, writing it in Django where Authentication is built-in will be a lot easier than writing it in Flask where you would need an additional service.&lt;/p&gt;

&lt;h2&gt;
  
  
  User Interface Frameworks
&lt;/h2&gt;

&lt;p&gt;User interface frameworks help create stylized and professional looking web applications. Most include some sort of grid system so that you align elements, they have color schemes so that is handled for you, and they stylize your HTML components using CSS so that they look clean and professional. These are within the frontend domain; however, normally when we refer to frontend frameworks we are talking about JavaScript frameworks.&lt;/p&gt;

&lt;h3&gt;
  
  
  User interface frameworks include:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://getbootstrap.com/"&gt;Bootstrap&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built by Twitter&lt;/li&gt;
&lt;li&gt;Easy to learn and looks professional&lt;/li&gt;
&lt;li&gt;Can be easy to spot "Bootstrap Sites"&lt;/li&gt;
&lt;li&gt;Can be difficult to customize components&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://materializecss.com/"&gt;Materialize&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Created and designed by Google&lt;/li&gt;
&lt;li&gt;Clean looking&lt;/li&gt;
&lt;li&gt;A bit more "fun" than Bootstrap&lt;/li&gt;
&lt;li&gt;Follows Google's Material style guide&lt;/li&gt;
&lt;li&gt;Lots of styling and color options&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;a href="https://get.foundation/"&gt;Foundation&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Advanced responsive layout&lt;/li&gt;
&lt;li&gt;Lots of examples&lt;/li&gt;
&lt;li&gt;Professional looking&lt;/li&gt;
&lt;li&gt;Used by-Adobe, EA,HP,Samsung,eBay,Disney.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Choosing a User Interface Framework
&lt;/h3&gt;

&lt;p&gt;Choosing a User Interface framework mostly comes down to personal preference in appearance and the goals of the site. The different styles may appeal to different industries or may convey a different message to users.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data Source- Medium,Google Searches,Ali Spittel&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Also, I would love to hear any feedback and review from you. Please tell me what you liked in the comment section below. Happy Learning!✨
&lt;/h3&gt;

</description>
      <category>webdev</category>
      <category>functional</category>
      <category>devops</category>
      <category>beginners</category>
    </item>
    <item>
      <title>My Visual Studio Code Setup</title>
      <dc:creator>Ankit Sinha</dc:creator>
      <pubDate>Sun, 14 Jun 2020 07:57:53 +0000</pubDate>
      <link>https://dev.to/theankitsinha/my-visual-studio-code-setup-1l2m</link>
      <guid>https://dev.to/theankitsinha/my-visual-studio-code-setup-1l2m</guid>
      <description>&lt;p&gt;I love the text editor setup I've been using for the past year and a half, so I want to show off my setup! Visual Studio Code has far surpassed my experiences with Spyder, Sublime Text, and Idle (the built-in Python editor) which I used for the years before it.&lt;br&gt;
I thought I would do a quick write up on my setup and the extensions I love!&lt;br&gt;
Today I'm going to share my favorite Code Editor settings, using for my web development. And I'm going to start with my Code Editor looks. After all, look matters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Theme&lt;/strong&gt;&lt;br&gt;
My most used VS Code theme is &lt;a href="https://marketplace.visualstudio.com/items?itemName=Equinusocio.vsc-material-theme"&gt;Material Theme&lt;/a&gt;, currently, I'm using this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sI2a-c1S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/60pjiw4swpf2o6353nsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sI2a-c1S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/60pjiw4swpf2o6353nsk.png" alt="Alt Text" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are many color themes available in this theme,&lt;br&gt;
I usually go for a dark theme, so my favorites are :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Material Theme Palenight High Contrast&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HjIEadC6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/1e5kyybiyqxn8p5x6xgz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HjIEadC6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/1e5kyybiyqxn8p5x6xgz.png" alt="Alt Text" width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Material Theme Ocean High Contrast&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hB8buNTB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/ectp09j4mc3mq8tytdbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hB8buNTB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/ectp09j4mc3mq8tytdbf.png" alt="Alt Text" width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Emmet&lt;/strong&gt;&lt;br&gt;
I am incredibly reliant on &lt;a href="https://emmet.io/"&gt;Emmet&lt;/a&gt;, so I love that it is built in for VS Code. I also have it set up to work in more than just my html files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// in settings.json&lt;/span&gt;
&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;emmet.includeLanguages&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;html&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;html&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;erb&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;erb&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;javascript&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;javascriptreact&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;html&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ejs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;html&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eDxRLIf7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/vdfjcsozrln9x53h4her.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eDxRLIf7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/vdfjcsozrln9x53h4her.gif" alt="Alt Text" width="714" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Icons&lt;/strong&gt;&lt;br&gt;
File Icons enhance our VS Code Editor looks. Mainly it helps us to differentiate between different files &amp;amp; folders by their given icons. For my VS Code, I use two file icons:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme"&gt;Material Icon Theme &lt;/a&gt;- One of the most popular icon theme for VS Code.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=Equinusocio.vsc-material-theme-icons"&gt;Material Theme Icons &lt;/a&gt;- Currently using this. And I'm using Material Theme Icons Light variant.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3axve5nR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/ect6y5vhn75tq2fq4r1x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3axve5nR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/ect6y5vhn75tq2fq4r1x.png" alt="Alt Text" width="750" height="571"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extensions I use&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I have a lot of language and framework-specific extensions built-in, which are boring and very dependent on the developer, so I will skip over those in order to discuss some of my favorite all-purpose extensions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag"&gt;Auto Rename Tag&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Automatically rename paired HTML/XML tag, also works in JSX.&lt;/p&gt;

&lt;p&gt;Add an entry into auto-rename-tag.activationOnLanguage, in your settings.json file to set the languages that the extension will be activated. By default, it is ["*"] and will be activated for all languages&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;auto-rename-tag.activationOnLanguage&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;html&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;xml&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;php&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;javascript&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UKy_Wpsc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/iyclpyec5z4vo40simh1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UKy_Wpsc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/iyclpyec5z4vo40simh1.gif" alt="Alt Text" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2"&gt;Bracket Pair Colorizer 2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This extension allows matching brackets to be identified with colors. The user can define which tokens to match, and which colors to use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NkXQIEga--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/pdsl023q8nbo5zqu6v23.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NkXQIEga--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/pdsl023q8nbo5zqu6v23.png" alt="Alt Text" width="625" height="119"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=humao.rest-client"&gt;REST Client&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This extension allows you to send HTTP request and view the response in Visual Studio Code directly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7O1tIHfu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/977pbig6zwsh478a62du.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7O1tIHfu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/977pbig6zwsh478a62du.gif" alt="Alt Text" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=naumovs.color-highlight"&gt;Color Highlight&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This extension styles css/web colors, found in your document&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MGZXiUZf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/xaywjoxzh4xhqh0ioh2i.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MGZXiUZf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/xaywjoxzh4xhqh0ioh2i.gif" alt="Alt Text" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode"&gt;Prettier&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.&lt;/p&gt;

&lt;p&gt;Set below property value to be true or add this property into your &lt;em&gt;settings.json&lt;/em&gt; file to format code on save.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;editor.formatOnSave&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fRQvfB3M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/cude9ahvo181jjxihq6z.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fRQvfB3M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/cude9ahvo181jjxihq6z.gif" alt="Alt Text" width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
I am really happy with my setup -- I have no complaints! Feel free to DM me any questions about my setup, and also send me your favorite tips and tricks!&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>productivity</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
