<?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: Md Sana ullah</title>
    <description>The latest articles on DEV Community by Md Sana ullah (@roton2).</description>
    <link>https://dev.to/roton2</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%2F1685888%2F7333bd01-8d2c-4602-914a-32ad262eba55.jpg</url>
      <title>DEV Community: Md Sana ullah</title>
      <link>https://dev.to/roton2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/roton2"/>
    <language>en</language>
    <item>
      <title>How to Host a Project on Firebase Hosting</title>
      <dc:creator>Md Sana ullah</dc:creator>
      <pubDate>Fri, 10 Jan 2025 18:08:20 +0000</pubDate>
      <link>https://dev.to/roton2/how-to-host-a-project-on-firebase-hosting-37dg</link>
      <guid>https://dev.to/roton2/how-to-host-a-project-on-firebase-hosting-37dg</guid>
      <description>&lt;p&gt;&lt;strong&gt;Step 1: Install Firebase CLI&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open your terminal and install Firebase CLI globally:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g firebase-tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Verify the installation:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;firebase --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Log in to Firebase&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log in to your Firebase account:&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;firebase login&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Follow the instructions in your browser to complete the authentication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Initialize Firebase Hosting&lt;/strong&gt;&lt;br&gt;
Navigate to your project folder:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Initialize Firebase Hosting:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;firebase init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Follow the prompts:&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Select Features: Use arrow keys to select Hosting: Configure files for Firebase Hosting (press space to select, then press enter).&lt;/li&gt;
&lt;li&gt;Select Project: Choose an existing Firebase project or create a new one.&lt;/li&gt;
&lt;li&gt;Public Directory: Enter the folder containing your built files (e.g., dist or build).&lt;/li&gt;
&lt;li&gt;Single-Page App: Choose Yes for "Configure as a single-page app."&lt;/li&gt;
&lt;li&gt;Overwrite Files: Choose No if it asks to overwrite index.html.
&lt;strong&gt;Step 4: Build Your Project&lt;/strong&gt;
If your project requires building (e.g., React or Vue), run:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ensure the output folder (e.g., dist or build) contains the production-ready files.&lt;br&gt;
**&lt;br&gt;
Step 5: Deploy Your Project**&lt;br&gt;
Deploy the project to Firebase Hosting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;firebase deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Once deployed, Firebase will provide a live URL for your project.
&lt;strong&gt;Step 6: Update and Redeploy&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make changes to your project locally.&lt;br&gt;
Build your project again:&lt;/p&gt;

&lt;p&gt;**&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;**&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy the updated project:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;firebase deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 7: Debugging Common Issues&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Incorrect Public Directory: Ensure the folder specified during initialization contains your index.html.&lt;br&gt;
Cache Issues: Clear your browser cache and hard reload the page.&lt;br&gt;
Error Logs: Check deployment logs in the terminal for debugging.&lt;br&gt;
Congratulations! Your project is now live on Firebase Hosting. 🎉&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>firebase</category>
    </item>
    <item>
      <title>How to Host a Project on Vercel Using a GitHub Repository</title>
      <dc:creator>Md Sana ullah</dc:creator>
      <pubDate>Fri, 10 Jan 2025 17:58:10 +0000</pubDate>
      <link>https://dev.to/roton2/how-to-host-a-project-on-vercel-using-a-github-repository-4aj3</link>
      <guid>https://dev.to/roton2/how-to-host-a-project-on-vercel-using-a-github-repository-4aj3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a GitHub Repository&lt;/li&gt;
&lt;li&gt;Go to GitHub and log in to your account.&lt;/li&gt;
&lt;li&gt;Click on the New Repository button.&lt;/li&gt;
&lt;li&gt;Provide a name for your repository, add a description, and set it to Public or Private.&lt;/li&gt;
&lt;li&gt;Click Create Repository.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;*&lt;em&gt;**Step 2:&lt;/em&gt;* Push Your Project to GitHub**&lt;br&gt;
Open your project folder in your terminal.&lt;br&gt;
Initialize a Git repository and push your project:&lt;br&gt;
bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin &amp;lt;your-repo-url&amp;gt;
git push -u origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;**&lt;br&gt;
&lt;strong&gt;Step 3: **Log in to Vercel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;to Vercel and sign in using your GitHub account.&lt;/li&gt;
&lt;li&gt;Authorize Vercel to access your GitHub repositories.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Import Your GitHub Repository&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After logging  in, click on the New Project button&lt;/li&gt;
&lt;li&gt; Select Import Git Repository and pick your repository from the list.&lt;/li&gt;
&lt;li&gt;Click Import.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Configure Your Project&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Review the configuration settings, such as:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Framework Preset: Vercel detects your framework automatically (e.g., React, Next.js, or Vue.js). If it doesn’t, select it manually.&lt;/li&gt;
&lt;li&gt;Build Command: Set your build command (e.g., npm run build).&lt;/li&gt;
&lt;li&gt;Output Directory: Specify the folder where your built files will be stored (e.g., dist or build).&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Click Deploy.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Wait for Deployment&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Vercel will start deploying your project.&lt;/li&gt;
&lt;li&gt;Once the deployment is complete, you will see a live link to your project.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 7: Update Your Project&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Make changes to your code locally.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Push the updates to your GitHub repository:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
git commit -m "Update project"
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Vercel will automatically rebuild and deploy the updated version&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 8: Access Your Project&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to your Vercel Dashboard.&lt;/li&gt;
&lt;li&gt;Click on your project to view details.&lt;/li&gt;
&lt;li&gt;Use the provided Live URL to access your project online.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Congratulations! Your project is now live on Vercel. 🎉&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>vercel</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Implement Dark Mode in Tailwind CSS in One Command</title>
      <dc:creator>Md Sana ullah</dc:creator>
      <pubDate>Fri, 10 Jan 2025 17:38:12 +0000</pubDate>
      <link>https://dev.to/roton2/how-to-implement-dark-mode-in-tailwind-css-in-one-command-4f82</link>
      <guid>https://dev.to/roton2/how-to-implement-dark-mode-in-tailwind-css-in-one-command-4f82</guid>
      <description>&lt;p&gt;&lt;strong&gt;Step 1: Run the Setup Command&lt;/strong&gt;&lt;br&gt;
Open your terminal and run the following command to create a complete Tailwind project with dark mode functionality:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir dark-mode-tailwind &amp;amp;&amp;amp; cd dark-mode-tailwind &amp;amp;&amp;amp; npm init -y &amp;amp;&amp;amp; npm install -D tailwindcss postcss autoprefixer &amp;amp;&amp;amp; npx tailwindcss init &amp;amp;&amp;amp; echo '@tailwind base;\n@tailwind components;\n@tailwind utilities;' &amp;gt; styles.css &amp;amp;&amp;amp; echo '&amp;lt;!DOCTYPE html&amp;gt;\n&amp;lt;html lang="en" class="dark"&amp;gt;\n&amp;lt;head&amp;gt;\n&amp;lt;meta charset="UTF-8" /&amp;gt;\n&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&amp;gt;\n&amp;lt;title&amp;gt;Dark Mode with Tailwind CSS&amp;lt;/title&amp;gt;\n&amp;lt;link rel="stylesheet" href="dist/styles.css" /&amp;gt;\n&amp;lt;/head&amp;gt;\n&amp;lt;body class="bg-white dark:bg-gray-900 text-gray-800 dark:text-gray-200"&amp;gt;\n&amp;lt;div class="min-h-screen flex flex-col items-center justify-center"&amp;gt;\n&amp;lt;h1 class="text-4xl font-bold mb-4"&amp;gt;Tailwind CSS Dark Mode&amp;lt;/h1&amp;gt;\n&amp;lt;p class="mb-6"&amp;gt;Toggle the button below to switch themes!&amp;lt;/p&amp;gt;\n&amp;lt;button id="theme-toggle" class="px-4 py-2 bg-blue-500 text-white rounded shadow-md dark:bg-yellow-400 dark:text-black"&amp;gt;Toggle Dark Mode&amp;lt;/button&amp;gt;\n&amp;lt;/div&amp;gt;\n&amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;\n&amp;lt;/body&amp;gt;\n&amp;lt;/html&amp;gt;' &amp;gt; index.html &amp;amp;&amp;amp; echo 'const themeToggleBtn = document.getElementById("theme-toggle");\nconst htmlElement = document.documentElement;\n\nif (localStorage.getItem("theme") === "dark") {\nhtmlElement.classList.add("dark");\n}\n\nthemeToggleBtn.addEventListener("click", () =&amp;gt; {\nif (htmlElement.classList.contains("dark")) {\nhtmlElement.classList.remove("dark");\nlocalStorage.setItem("theme", "light");\n} else {\nhtmlElement.classList.add("dark");\nlocalStorage.setItem("theme", "dark");\n}\n});' &amp;gt; script.js &amp;amp;&amp;amp; npm run build &amp;amp;&amp;amp; npx tailwindcss -i ./styles.css -o ./dist/styles.css --watch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: Open the Project&lt;br&gt;
After the command completes, open the folder in your code editor. Your files are ready, and you can test the project in any live server, such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx live-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What the Command Does&lt;br&gt;
Creates a project folder (dark-mode-tailwind) and navigates into it.&lt;br&gt;
Initializes the project with npm and installs Tailwind CSS dependencies.&lt;br&gt;
Configures Tailwind CSS and creates the required styles.css file.&lt;br&gt;
Adds a basic index.html with a dark mode toggle button.&lt;br&gt;
Writes a script.js file to handle dark mode logic using localStorage.&lt;br&gt;
Builds the Tailwind CSS file for immediate use.&lt;br&gt;
Test the Dark Mode&lt;br&gt;
Open index.html in a browser.&lt;br&gt;
Click the "Toggle Dark Mode" button to switch themes.&lt;br&gt;
Your preference will persist even after refreshing, thanks to localStorage!&lt;br&gt;
Enjoy coding! 😊&lt;/p&gt;

</description>
      <category>programming</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
