<?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>Forem: Utkarsh Singh</title>
    <description>The latest articles on Forem by Utkarsh Singh (@utkarsh_singh_).</description>
    <link>https://forem.com/utkarsh_singh_</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%2F3041258%2Fb846c212-b7dc-4d39-9d91-1572750c93f9.jpeg</url>
      <title>Forem: Utkarsh Singh</title>
      <link>https://forem.com/utkarsh_singh_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/utkarsh_singh_"/>
    <language>en</language>
    <item>
      <title>GitHub Actions for Beginners: Automate Everything</title>
      <dc:creator>Utkarsh Singh</dc:creator>
      <pubDate>Fri, 11 Apr 2025 11:17:40 +0000</pubDate>
      <link>https://forem.com/utkarsh_singh_/github-actions-for-beginners-automate-everything-1oma</link>
      <guid>https://forem.com/utkarsh_singh_/github-actions-for-beginners-automate-everything-1oma</guid>
      <description>&lt;p&gt;GitHub Actions makes automation easy for developers. Whether you want to lint code, run tests, deploy apps, or just automate boring tasks — GitHub Actions has your back.&lt;/p&gt;

&lt;p&gt;In this guide, we'll walk through:&lt;/p&gt;

&lt;p&gt;What GitHub Actions are&lt;/p&gt;

&lt;p&gt;How workflows work&lt;/p&gt;

&lt;p&gt;Real-world automation examples&lt;/p&gt;

&lt;p&gt;How to create your first Action&lt;/p&gt;

&lt;p&gt;What is GitHub Actions?&lt;br&gt;
GitHub Actions is a CI/CD platform built right into GitHub. It lets you create workflows that run automatically based on events — like pushing code, opening pull requests, or on a schedule.&lt;/p&gt;

&lt;p&gt;Anatomy of a Workflow&lt;br&gt;
A typical GitHub Actions workflow lives in your repo at .github/workflows/. Here's what a minimal example looks like:&lt;/p&gt;

&lt;p&gt;name: Say Hello&lt;/p&gt;

&lt;p&gt;on: [push]&lt;/p&gt;

&lt;p&gt;jobs:&lt;br&gt;
  greet:&lt;br&gt;
    runs-on: ubuntu-latest&lt;br&gt;
    steps:&lt;br&gt;
      - name: Print Hello&lt;br&gt;
        run: echo "Hello, GitHub Actions!"&lt;/p&gt;

&lt;p&gt;Key Parts:&lt;br&gt;
on: Triggers (e.g., push, pull_request, schedule)&lt;/p&gt;

&lt;p&gt;jobs: Independent units of work&lt;/p&gt;

&lt;p&gt;steps: Commands or actions run inside a job&lt;/p&gt;

&lt;p&gt;Example 1: Run Tests on Every Push&lt;/p&gt;

&lt;p&gt;name: Run Tests&lt;/p&gt;

&lt;p&gt;on: [push, pull_request]&lt;/p&gt;

&lt;p&gt;jobs:&lt;br&gt;
  test:&lt;br&gt;
    runs-on: ubuntu-latest&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;steps:
  - uses: actions/checkout@v3
  - name: Set up Node
    uses: actions/setup-node@v4
    with:
      node-version: '18'
  - run: npm install
  - run: npm test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This will automatically run your tests for every commit and PR.&lt;/p&gt;

&lt;p&gt;Example 2: Auto Deploy to&lt;br&gt;
Vercel/Netlify/Firebase&lt;br&gt;
Using a custom deploy Action or CLI tool, you can deploy on push to main:&lt;/p&gt;

&lt;p&gt;on:&lt;br&gt;
  push:&lt;br&gt;
    branches: [main]&lt;/p&gt;

&lt;p&gt;jobs:&lt;br&gt;
  deploy:&lt;br&gt;
    runs-on: ubuntu-latest&lt;br&gt;
    steps:&lt;br&gt;
      - uses: actions/checkout@v3&lt;br&gt;
      - run: npx vercel --prod --token=${{ secrets.VERCEL_TOKEN }}&lt;/p&gt;

&lt;p&gt;Example 3: Auto-format Code with Prettier&lt;/p&gt;

&lt;p&gt;on: [push]&lt;/p&gt;

&lt;p&gt;jobs:&lt;br&gt;
  format:&lt;br&gt;
    runs-on: ubuntu-latest&lt;br&gt;
    steps:&lt;br&gt;
      - uses: actions/checkout@v3&lt;br&gt;
      - run: npm ci&lt;br&gt;
      - run: npx prettier --write .&lt;/p&gt;

&lt;p&gt;Add a commit step and you can even push formatting fixes automatically.&lt;/p&gt;

&lt;p&gt;Using Secrets&lt;br&gt;
Keep tokens and credentials safe:&lt;/p&gt;

&lt;p&gt;Go to your repo &amp;gt; Settings &amp;gt; Secrets and Variables&lt;/p&gt;

&lt;p&gt;Add secrets like VERCEL_TOKEN, GH_TOKEN, etc.&lt;/p&gt;

&lt;p&gt;Access them in workflows like: ${{ secrets.YOUR_SECRET_NAME }}&lt;/p&gt;

&lt;p&gt;Bonus: Use Marketplace Actions&lt;br&gt;
The GitHub Marketplace has thousands of reusable actions. Example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: build&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wrapping Up&lt;br&gt;
GitHub Actions is powerful, flexible, and beginner-friendly. Start with:&lt;/p&gt;

&lt;p&gt;Running tests&lt;/p&gt;

&lt;p&gt;Formatting code&lt;/p&gt;

&lt;p&gt;Deploying apps&lt;/p&gt;

&lt;p&gt;Then explore advanced workflows: matrix builds, reusable workflows, and self-hosted runners.&lt;/p&gt;

&lt;p&gt;Written by Utkarsh Singh, Full Stack Developer&lt;/p&gt;

</description>
      <category>git</category>
      <category>githubactions</category>
      <category>beginners</category>
      <category>github</category>
    </item>
    <item>
      <title>Understanding the MERN Stack: A Beginner’s Guide</title>
      <dc:creator>Utkarsh Singh</dc:creator>
      <pubDate>Fri, 11 Apr 2025 10:57:57 +0000</pubDate>
      <link>https://forem.com/utkarsh_singh_/understanding-the-mern-stack-a-beginners-guide-5d1k</link>
      <guid>https://forem.com/utkarsh_singh_/understanding-the-mern-stack-a-beginners-guide-5d1k</guid>
      <description>&lt;p&gt;The MERN stack is one of the most popular tech stacks for modern web development. If you're a budding developer or just curious about how full stack apps are built, this guide will walk you through the essentials of MERN.&lt;/p&gt;

&lt;p&gt;What is the MERN Stack?&lt;br&gt;
MERN is an acronym for four key technologies:&lt;/p&gt;

&lt;p&gt;MongoDB – NoSQL database used to store application data as documents in JSON-like format.&lt;/p&gt;

&lt;p&gt;Express.js – A lightweight web framework for Node.js to build APIs and handle backend logic.&lt;/p&gt;

&lt;p&gt;React.js – A JavaScript library for building fast and interactive user interfaces.&lt;/p&gt;

&lt;p&gt;Node.js – A JavaScript runtime for executing server-side code.&lt;/p&gt;

&lt;p&gt;Together, they create a full stack environment entirely based on JavaScript — from client to server to database.&lt;/p&gt;

&lt;p&gt;Why Choose MERN?&lt;br&gt;
Single Language Stack: JavaScript is used throughout, which makes development faster and easier to debug.&lt;/p&gt;

&lt;p&gt;Full Flexibility: You can build anything from small apps to enterprise-level platforms.&lt;/p&gt;

&lt;p&gt;Active Community: Tons of resources, packages, and support from other developers.&lt;/p&gt;

&lt;p&gt;How the Pieces Fit Together&lt;br&gt;
Frontend (React)&lt;/p&gt;

&lt;p&gt;Users interact with a UI built in React.&lt;/p&gt;

&lt;p&gt;Components manage state and trigger events.&lt;/p&gt;

&lt;p&gt;Backend (Express + Node)&lt;/p&gt;

&lt;p&gt;React sends HTTP requests to the Express server.&lt;/p&gt;

&lt;p&gt;Express handles routing, logic, and interacts with the database.&lt;/p&gt;

&lt;p&gt;Database (MongoDB)&lt;/p&gt;

&lt;p&gt;Data is stored in collections and documents.&lt;/p&gt;

&lt;p&gt;Mongoose (an ODM) often connects MongoDB with the Express app.&lt;/p&gt;

&lt;p&gt;Project Example: Simple To-Do App&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here’s how you’d use MERN to build a To-Do app:&lt;/li&gt;
&lt;li&gt;React: A form to add tasks, a list to display them.&lt;/li&gt;
&lt;li&gt;Express/Node: REST API endpoints like GET /tasks, POST /task.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;MongoDB: Stores tasks in a collection with fields like title and status.&lt;/p&gt;

&lt;p&gt;Getting Started&lt;br&gt;
Basic tools you'll need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node.js and npm&lt;/li&gt;
&lt;li&gt;MongoDB (or MongoDB Atlas for cloud)&lt;/li&gt;
&lt;li&gt;A code editor like VS Code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Initialize your project:&lt;br&gt;
npx create-react-app client&lt;br&gt;
mkdir server &amp;amp;&amp;amp; cd server&lt;br&gt;
npm init -y&lt;br&gt;
npm install express mongoose cors&lt;/p&gt;

&lt;p&gt;Set up your backend server in server/index.js and frontend in the client folder. Connect them using Axios or Fetch API.&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;br&gt;
Learning the MERN stack is a great step toward becoming a full stack developer. It’s a practical and powerful toolset that is widely used in the industry. Start small, build projects, and grow from there.&lt;/p&gt;

&lt;p&gt;Written by Utkarsh Singh&lt;br&gt;
Full Stack Developer | CSE Enthusiast&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>html</category>
      <category>postgres</category>
      <category>mern</category>
    </item>
  </channel>
</rss>
