<?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: shubham paul</title>
    <description>The latest articles on Forem by shubham paul (@shu12388y).</description>
    <link>https://forem.com/shu12388y</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%2F992182%2F6f436a1c-b5b8-4634-8073-7605300f1db7.jpeg</url>
      <title>Forem: shubham paul</title>
      <link>https://forem.com/shu12388y</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/shu12388y"/>
    <language>en</language>
    <item>
      <title>Speed Up Your Next.js Build Time with Turbopack</title>
      <dc:creator>shubham paul</dc:creator>
      <pubDate>Sat, 14 Jun 2025 15:57:03 +0000</pubDate>
      <link>https://forem.com/shu12388y/speed-up-your-nextjs-build-time-with-turbopack-45h3</link>
      <guid>https://forem.com/shu12388y/speed-up-your-nextjs-build-time-with-turbopack-45h3</guid>
      <description>&lt;p&gt;If you're building with Next.js, chances are you’ve run into the occasional long build times, especially as your app scales. What if you could supercharge your local dev experience and optimize your iteration loop?&lt;/p&gt;

&lt;p&gt;Say hello to Turbopack — the successor to Webpack, built by the creators of Next.js. In this blog, we’ll explore how to optimize your Next.js development and build experience using Turbopack.&lt;/p&gt;

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

&lt;p&gt;Turbopack is a new JavaScript bundler written in Rust, designed to be blazingly fast and incremental. Unlike Webpack, which recompiles everything, Turbopack only compiles what’s necessary.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Incremental builds (only what’s changed)&lt;/li&gt;
&lt;li&gt;Lazy bundling (only what you’re using now)&lt;/li&gt;
&lt;li&gt;Built-in for Next.js 13.4+&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Think of it as Vite on steroids — but made for React and Next.js.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Important Note
&lt;/h2&gt;

&lt;p&gt;Turbopack is currently:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Stable for next dev&lt;br&gt;
Still experimental for next build&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So in this blog, we’ll focus primarily on development time optimizations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Turbopack in Your Next.js App
&lt;/h2&gt;

&lt;p&gt;Step 1: Upgrade Next.js&lt;br&gt;
Make sure your app is using Next.js 13.4 or newer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install next@latest react@latest react-dom@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: Enable Turbopack in dev script&lt;br&gt;
Update your package.json:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "scripts": {
    "dev": "next dev --turbo",
    "build": "next build",
    "start": "next start"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run:&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 dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why Turbopack is Game-Changing
&lt;/h2&gt;

&lt;p&gt;Let’s compare it to the old experience:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Webpack (Default)&lt;/th&gt;
&lt;th&gt;Turbopack (New)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cold start&lt;/td&gt;
&lt;td&gt;🐢 Slower&lt;/td&gt;
&lt;td&gt;⚡ Fast (~10x faster)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rebuild on change&lt;/td&gt;
&lt;td&gt;🐌 Often sluggish&lt;/td&gt;
&lt;td&gt;⚡ Near instant&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Incremental builds&lt;/td&gt;
&lt;td&gt;❌ Full rebuild&lt;/td&gt;
&lt;td&gt;✅ Smart rebuilds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dev performance&lt;/td&gt;
&lt;td&gt;😤 Meh&lt;/td&gt;
&lt;td&gt;😎 Smooth and reactive&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What About next build --turbo?
&lt;/h2&gt;

&lt;p&gt;As of now (Next.js 14.x), --turbo is not yet supported for production builds.&lt;/p&gt;

&lt;p&gt;Running:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;...will throw:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: unknown option '--turbo'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Happy Coding&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Common cors misconfigure errors</title>
      <dc:creator>shubham paul</dc:creator>
      <pubDate>Mon, 14 Apr 2025 05:06:18 +0000</pubDate>
      <link>https://forem.com/shu12388y/common-cors-misconfigure-errors-3gf6</link>
      <guid>https://forem.com/shu12388y/common-cors-misconfigure-errors-3gf6</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/shu12388y/how-i-found-a-cors-misconfiguration-no-rate-limiting-on-a-live-website-2088" class="crayons-story__hidden-navigation-link"&gt;How I Found a CORS Misconfiguration + No Rate Limiting on a Live Website&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/shu12388y" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F992182%2F6f436a1c-b5b8-4634-8073-7605300f1db7.jpeg" alt="shu12388y profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/shu12388y" class="crayons-story__secondary fw-medium m:hidden"&gt;
              shubham paul
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                shubham paul
                
              
              &lt;div id="story-author-preview-content-2405511" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/shu12388y" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F992182%2F6f436a1c-b5b8-4634-8073-7605300f1db7.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;shubham paul&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/shu12388y/how-i-found-a-cors-misconfiguration-no-rate-limiting-on-a-live-website-2088" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Apr 14 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/shu12388y/how-i-found-a-cors-misconfiguration-no-rate-limiting-on-a-live-website-2088" id="article-link-2405511"&gt;
          How I Found a CORS Misconfiguration + No Rate Limiting on a Live Website
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/javascript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;javascript&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/frontend"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;frontend&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cybersecurity"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cybersecurity&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/shu12388y/how-i-found-a-cors-misconfiguration-no-rate-limiting-on-a-live-website-2088" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;5&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/shu12388y/how-i-found-a-cors-misconfiguration-no-rate-limiting-on-a-live-website-2088#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>How I Found a CORS Misconfiguration + No Rate Limiting on a Live Website</title>
      <dc:creator>shubham paul</dc:creator>
      <pubDate>Mon, 14 Apr 2025 05:05:47 +0000</pubDate>
      <link>https://forem.com/shu12388y/how-i-found-a-cors-misconfiguration-no-rate-limiting-on-a-live-website-2088</link>
      <guid>https://forem.com/shu12388y/how-i-found-a-cors-misconfiguration-no-rate-limiting-on-a-live-website-2088</guid>
      <description>&lt;p&gt;While exploring a few public websites last week, I stumbled upon a surprisingly common yet dangerous combination of vulnerabilities — CORS misconfiguration and lack of API rate limiting.&lt;/p&gt;

&lt;p&gt;These two issues, together, could allow any attacker to fetch data from protected APIs and overwhelm the server with thousands of requests. In this post, I’ll explain what I found, why it’s a problem, and how you can protect your applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔍 What I Discovered
&lt;/h2&gt;

&lt;p&gt;I was casually inspecting the network requests of a few websites and noticed something odd:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Their APIs responded to requests from any origin.&lt;/li&gt;
&lt;li&gt;There was no authentication or token-based validation in place.&lt;/li&gt;
&lt;li&gt;Even worse, I could send unlimited requests — no rate limiting at all!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Using just a browser or tools like Postman, I could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access data that should’ve been private&lt;/li&gt;
&lt;li&gt;Simulate a Denial-of-Service (DoS) attack by sending rapid requests&lt;/li&gt;
&lt;li&gt;Fetch and manipulate API data without being on the same domain&lt;/li&gt;
&lt;/ul&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%2Foaz0kydmlo1s79uigslx.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%2Foaz0kydmlo1s79uigslx.png" alt="cors error, cors misconfigure" width="800" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔐 Let’s Talk About CORS
&lt;/h2&gt;

&lt;p&gt;CORS (Cross-Origin Resource Sharing) is a security feature implemented by browsers that restricts web pages from making requests to a different domain than the one that served the page.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚠️ The Misconfiguration
&lt;/h2&gt;

&lt;p&gt;The affected websites had this kind of header:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Access-Control-Allow-Origin: *&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That * wildcard means any website (even malicious ones) can make requests to this API and get a response.&lt;/p&gt;

&lt;h2&gt;
  
  
  💣 No API Rate Limiting = Major Exploitation Risk
&lt;/h2&gt;

&lt;p&gt;To make things worse, their server didn’t implement any rate limiting. This means I could send thousands of requests per second without any throttling or blocking.&lt;/p&gt;

&lt;p&gt;📉 Why That’s Dangerous:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resource Exhaustion: Servers can get overwhelmed and crash.&lt;/li&gt;
&lt;li&gt;Cost Spike: For APIs hosted on cloud platforms, excessive requests = higher billing.&lt;/li&gt;
&lt;li&gt;Easy for Bots and Scrapers: Anyone can write a script and steal your data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🛡️ How to Prevent This
&lt;/h2&gt;

&lt;p&gt;✅ Secure CORS Configuration&lt;br&gt;
Never use Access-Control-Allow-Origin: * in production for sensitive endpoints.&lt;/p&gt;

&lt;p&gt;Use something like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Access-Control-Allow-Origin: https://your-frontend.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And set proper headers:&lt;br&gt;
&lt;code&gt;Access-Control-Allow-Methods: GET, POST, OPTIONS&lt;br&gt;
Access-Control-Allow-Headers: Content-Type, Authorization&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  ✅ Implement Rate Limiting
&lt;/h2&gt;

&lt;p&gt;If you’re using Node.js (Express.js), you can use libraries like express-rate-limit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const rateLimit = require("express-rate-limit");

const limiter = rateLimit({
  windowMs: 1 * 60 * 1000, // 1 minute
  max: 100, // limit each IP to 100 requests per minute
});

app.use('/api/', limiter);

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  📌 Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;CORS should never be wide open unless the data is truly public.&lt;/li&gt;
&lt;li&gt;Rate limiting is essential for every production-grade API.&lt;/li&gt;
&lt;li&gt;Even small misconfigurations can open the door to serious security issues.&lt;/li&gt;
&lt;li&gt;Always audit your APIs regularly for vulnerabilities.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Resolving Breaking Changes in Next.js 15 and React 19 with NPM: A Developer’s Guide</title>
      <dc:creator>shubham paul</dc:creator>
      <pubDate>Fri, 22 Nov 2024 04:59:35 +0000</pubDate>
      <link>https://forem.com/shu12388y/resolving-breaking-changes-in-nextjs-15-and-react-19-with-npm-a-developers-guide-1oag</link>
      <guid>https://forem.com/shu12388y/resolving-breaking-changes-in-nextjs-15-and-react-19-with-npm-a-developers-guide-1oag</guid>
      <description>&lt;p&gt;With the release of Next.js 15 and React 19, developers have encountered challenges with package compatibility and dependency conflicts. These versions bring significant improvements, but the breaking changes can disrupt workflows, particularly during development and deployment. One common issue arises from incompatible packages that require manual intervention to install correctly.&lt;/p&gt;

&lt;p&gt;In this blog, I’ll walk you through the problem and provide a solution to ensure smooth development and deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: Package Compatibility
&lt;/h2&gt;

&lt;p&gt;When upgrading to Next.js 15 and React 19, you might encounter errors like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm ERR! Could not resolve dependency:  
npm ERR! peer &amp;lt;package-name&amp;gt; is not compatible with react@^19.0.0  

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

&lt;/div&gt;



&lt;p&gt;These errors typically arise because some packages are not yet fully compatible with the latest versions of Next.js or React. The peerDependency conflicts force npm to halt the installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-world Scenario
&lt;/h2&gt;

&lt;p&gt;Imagine you are trying to install a UI library or utility package, and npm refuses to proceed due to incompatible peer dependencies. This issue escalates when deploying applications on platforms like Vercel, where the build process halts due to these conflicts.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: Using --force
&lt;/h2&gt;

&lt;p&gt;To bypass these dependency conflicts, npm provides the --force flag. This flag instructs npm to install the package regardless of peer dependency issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Installing Packages Locally
&lt;/h2&gt;

&lt;p&gt;During development, use the following command to resolve the dependency issues:&lt;br&gt;
&lt;code&gt;npm install &amp;lt;package-name&amp;gt; --force&lt;/code&gt;&lt;br&gt;
This command forces npm to ignore dependency constraints and proceed with the installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Handling Deployment on Platforms like Vercel
&lt;/h2&gt;

&lt;p&gt;When deploying your Next.js 15 app, you might encounter similar issues during the build process. To ensure the deployment completes successfully, update your deployment configuration to include the --force flag in the install command.&lt;/p&gt;

&lt;p&gt;For Vercel, you can achieve this by adding a custom install command in the project settings:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to your Vercel Dashboard.&lt;/li&gt;
&lt;li&gt;Select your project.&lt;/li&gt;
&lt;li&gt;Navigate to the Build &amp;amp; Development Settings.&lt;/li&gt;
&lt;li&gt;Under the Install Command&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;npm install --force&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices
&lt;/h2&gt;

&lt;p&gt;While the --force flag resolves the issue, it’s essential to approach this workaround cautiously:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check for Compatibility Updates: Regularly check if the conflicting packages have released updates compatible with Next.js 15 and React 19.&lt;/li&gt;
&lt;li&gt;Monitor Application Behavior: Forced installations might lead to runtime issues. Test your application thoroughly after resolving dependencies with --force.&lt;/li&gt;
&lt;li&gt;Submit Issues: If you encounter compatibility problems, report them to the package maintainers. This helps improve the ecosystem.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Next.js 15 and React 19 bring powerful features, but breaking changes can disrupt workflows. Using npm install --force is a temporary workaround to handle dependency conflicts during development and deployment. While this method is effective, it’s crucial to stay updated with package compatibility and test your application rigorously.&lt;/p&gt;

&lt;p&gt;Happy coding with Next.js 15 and React 19! 🚀&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>nextjs</category>
      <category>npm</category>
    </item>
    <item>
      <title>From Contributor to Maintainer: My Hacktoberfest Journey 🎉</title>
      <dc:creator>shubham paul</dc:creator>
      <pubDate>Sat, 26 Oct 2024 07:14:59 +0000</pubDate>
      <link>https://forem.com/shu12388y/from-contributor-to-maintainer-my-hacktoberfest-journey-3566</link>
      <guid>https://forem.com/shu12388y/from-contributor-to-maintainer-my-hacktoberfest-journey-3566</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest"&gt;2024 Hacktoberfest Writing challenge&lt;/a&gt;: Maintainer Experience&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Hey, everyone! This year’s Hacktoberfest has been quite a milestone for me, as I took the leap from contributor to maintainer for the first time! In this post, I’m excited to share my journey, some of the challenges I faced, and what I learned along the way. Hopefully, my story can inspire others to step up and maintain their own projects, or simply get involved with open source in a new way!&lt;/p&gt;

&lt;h2&gt;
  
  
  🌱 Starting as a Contributor
&lt;/h2&gt;

&lt;p&gt;Last year was my first Hacktoberfest, and I participated as a contributor. I started small, working on minor issues, enhancing documentation, and fixing bugs. Through each pull request, I learned a lot about open-source collaboration, how repositories are structured, and how to communicate effectively with maintainers.&lt;/p&gt;

&lt;p&gt;Contributing not only improved my technical skills but also taught me the importance of clean code, meaningful comments, and the incredible support the open-source community provides. This experience gave me the confidence to contribute to more significant projects, and by the end of last year, I knew I wanted to do more than just contribute.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✨ Becoming a Maintainer
&lt;/h2&gt;

&lt;p&gt;Fast forward to this year—Hacktoberfest 2024—and I decided to step up as a maintainer. It felt like a natural progression, but it also came with a whole new set of responsibilities. Here’s how I prepared for the transition:&lt;/p&gt;

&lt;p&gt;Choosing the Right Project: I selected a project where I felt confident in both the codebase and the purpose of the application. I wanted a project that could help the community and provide new contributors with a positive experience.&lt;/p&gt;

&lt;p&gt;Creating Contributing Guidelines: My first task as a maintainer was to create clear and detailed contributing guidelines. It’s essential to make the contribution process as smooth as possible, especially for beginners. I also wrote a Code of Conduct to foster a respectful and inclusive environment.&lt;/p&gt;

&lt;p&gt;Setting Up Issues and Labels: I carefully defined issues that ranged from beginner-friendly (like documentation improvements) to advanced (such as feature enhancements). Properly labeled issues helped contributors quickly find tasks that matched their skill levels.&lt;/p&gt;

&lt;p&gt;Being Ready for Questions: As a contributor, I often had questions about issues. Now, as a maintainer, it was my turn to answer them! I made sure to be active on GitHub discussions and regularly reviewed pull requests. Communication became key, and I was constantly balancing encouragement with constructive feedback.&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 What I Learned
&lt;/h2&gt;

&lt;p&gt;Taking on the maintainer role taught me a few invaluable lessons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Empathy Matters: When reviewing PRs, it’s essential to be understanding. Every contributor is at a different skill level, so being patient and offering guidance can make all the difference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Documentation Is Gold: I underestimated the power of clear documentation until I saw contributors breeze through issues with the right guidance. Documentation really is the key to open-source success.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It’s About the Community: Being a maintainer isn’t just about managing code; it’s about building a welcoming space for contributors. Celebrating their work and making them feel valued is essential.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  🎉 Wrapping Up Hacktoberfest 2024
&lt;/h2&gt;

&lt;p&gt;As Hacktoberfest 2024 comes to a close, I’m grateful for everything I’ve learned this year. Becoming a maintainer has not only improved my technical skills but also taught me leadership, patience, and the importance of community. Watching contributors make their first PRs and grow through my project has been incredibly fulfilling, and it’s something I hope to continue doing well beyond Hacktoberfest.&lt;/p&gt;

&lt;p&gt;For anyone thinking of becoming a maintainer, I say go for it! It’s challenging, but the rewards are absolutely worth it.&lt;/p&gt;

&lt;p&gt;Thank you for reading! I’d love to hear about your Hacktoberfest experiences in the comments.&lt;/p&gt;

&lt;p&gt;Github Link: &lt;a href="https://dev.tourl"&gt;&lt;/a&gt;&lt;a href="https://github.com/Lets-code-with-us/scamwebsiteV1" rel="noopener noreferrer"&gt;https://github.com/Lets-code-with-us/scamwebsiteV1&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hacktoberfest</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Why We Migrated Our WordPress Site from Hostinger to AWS LightSail</title>
      <dc:creator>shubham paul</dc:creator>
      <pubDate>Sat, 26 Oct 2024 06:36:33 +0000</pubDate>
      <link>https://forem.com/shu12388y/why-we-migrated-our-wordpress-site-from-hostinger-to-aws-lightsail-4pdl</link>
      <guid>https://forem.com/shu12388y/why-we-migrated-our-wordpress-site-from-hostinger-to-aws-lightsail-4pdl</guid>
      <description>&lt;p&gt;For over three years, our company’s WordPress blog was hosted on Hostinger. However, we recently decided to migrate to AWS LightSail to leverage its reliability, scalability, and cost-effectiveness. Although AWS EC2 could also host WordPress, it requires extensive manual configuration, which we opted to avoid at this stage. In this blog, I’ll walk you through how to migrate an existing WordPress site to AWS LightSail or set up a new one, detailing each step for a smooth transition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create a new AWS account, if you have sign in to AWS console&lt;/strong&gt;&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%2Fcwnwyortpnwex14prxhj.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%2Fcwnwyortpnwex14prxhj.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Search LightSail&lt;/strong&gt;&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%2Fofb6q2lud7m4970t1ooe.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%2Fofb6q2lud7m4970t1ooe.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Create the wordpress App&lt;/strong&gt;&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%2Fqnlpjwn65pgmr77wt7xz.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%2Fqnlpjwn65pgmr77wt7xz.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Choose your Pricing plan&lt;/strong&gt;&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%2F60anarietk2mh5nt3mb4.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%2F60anarietk2mh5nt3mb4.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Go to the wordpress console&lt;/strong&gt;&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%2Fikal8nje74ouht1xch7n.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%2Fikal8nje74ouht1xch7n.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Copy the public IP address and check the site is working or not&lt;/strong&gt;&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%2F8vljm332j3lpy8q4kejw.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%2F8vljm332j3lpy8q4kejw.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7: Now login to wp-admin&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;username: user&lt;br&gt;
password: For the password go to console / shell run the command&lt;br&gt;
&lt;code&gt;cat bitnami_application_password&lt;/code&gt;&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%2Fdezqaupr0bho3f6swxbq.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%2Fdezqaupr0bho3f6swxbq.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 8: For migration Install a plugin All-in-One WP Migration. Download your old wordpress site and using this plugin import it you new wordpress site&lt;/strong&gt;&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%2Fl1j7zcylhx0iq7k9qob0.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%2Fl1j7zcylhx0iq7k9qob0.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But you will not able to upload your site run this command&lt;br&gt;
&lt;code&gt;Check file upload limit: php -i |egrep &lt;br&gt;
 'upload_max_filesize|post_max_size'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;By default it will be 80M&lt;/p&gt;

&lt;p&gt;We have to change &lt;/p&gt;

&lt;p&gt;Run this command&lt;br&gt;
&lt;code&gt;sudo vi +/upload_max_filesize /opt/bitnami/php/etc/php.ini&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Change the two file limit  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;upload_max_filesize = 300M&lt;/li&gt;
&lt;li&gt;post_max_size = 300M&lt;/li&gt;
&lt;/ol&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%2Fvsabcjstm43rkstrxvfl.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%2Fvsabcjstm43rkstrxvfl.png" width="800" height="450"&gt;&lt;/a&gt;&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%2F4w4bwvc1mvjd2n4g57rh.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%2F4w4bwvc1mvjd2n4g57rh.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's install the SSL cerificate&lt;/p&gt;

&lt;p&gt;Run the command &lt;code&gt;sudo /opt/bitnami/bncert-tool&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Configure your domain name and You website is ready&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>aws</category>
      <category>lightsail</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>✨ From Contributor to Core Project Maintainer: My Open Source Journey ✨</title>
      <dc:creator>shubham paul</dc:creator>
      <pubDate>Fri, 11 Oct 2024 19:04:24 +0000</pubDate>
      <link>https://forem.com/shu12388y/from-contributor-to-core-project-maintainer-my-open-source-journey-588g</link>
      <guid>https://forem.com/shu12388y/from-contributor-to-core-project-maintainer-my-open-source-journey-588g</guid>
      <description>&lt;p&gt;It all started with a simple pull request...&lt;/p&gt;

&lt;p&gt;I remember when I first ventured into the world of open source. My initial goal was just to solve a minor issue in a project I admired. Little did I know, that small contribution would begin an incredible journey.&lt;/p&gt;

&lt;p&gt;Step 1: Starting as a Contributor Initially, I was nervous to contribute. I wasn’t sure if my code was good enough or if my solutions were valid. But with time, I realized that the open-source community is incredibly supportive. My early contributions focused on fixing bugs and writing documentation. With each pull request, I learned more about the project’s structure, gained confidence in my skills, and found a sense of fulfillment knowing my work was impacting developers globally.&lt;/p&gt;

&lt;p&gt;Step 2: Building Trust and Gaining Responsibility As I became more involved, I started engaging with the community—helping other contributors, participating in discussions, and proposing enhancements. I wasn’t just coding anymore; I was shaping the direction of the project. The project's maintainers noticed my growing commitment and the quality of my contributions.&lt;/p&gt;

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

&lt;p&gt;They trusted me with more responsibilities, including triaging issues and reviewing other contributors' work.&lt;/p&gt;

&lt;p&gt;Step 3: Becoming a Core Project Maintainer Eventually, after consistent contributions and dedication, I was invited to become a core project maintainer. It was a humbling and proud moment! This role came with more responsibility—guiding the project’s roadmap, mentoring new contributors, and ensuring the project's long-term sustainability. I also became the bridge between the community and the vision of the project.&lt;/p&gt;

&lt;p&gt;The Lessons I’ve Learned:&lt;/p&gt;

&lt;p&gt;🌱 Start small: Every pull request, even if it’s fixing a typo, matters.&lt;br&gt;
🤝 Engage with the community: Building relationships is just as important as coding.&lt;br&gt;
💡 Stay consistent: Show up, contribute meaningfully, and your efforts will be noticed.&lt;br&gt;
🚀 Never stop learning: The world of open source is dynamic, and there's always something new to learn.&lt;br&gt;
Today, as a core maintainer, I’m excited to continue growing, helping others on their open-source journey, and contributing to the projects that make a difference. 🚀&lt;/p&gt;

&lt;h1&gt;
  
  
  opensource #techjourney #developerlife #opencontributor #projectmaintainer #codingcommunity
&lt;/h1&gt;

</description>
      <category>hacktoberfest</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Supercharge Your Node.js App with Blazing Fast In-Memory Caching!</title>
      <dc:creator>shubham paul</dc:creator>
      <pubDate>Tue, 02 Jul 2024 17:55:00 +0000</pubDate>
      <link>https://forem.com/shu12388y/supercharge-your-nodejs-app-with-blazing-fast-in-memory-caching-3jec</link>
      <guid>https://forem.com/shu12388y/supercharge-your-nodejs-app-with-blazing-fast-in-memory-caching-3jec</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;If you’re experiencing latency issues in your Node.js application, implementing in-memory caching can be a game-changer. This guide will walk you through how to set up in-memory caching using node-cache in an Express.js server to significantly improve your API performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Challenge
&lt;/h2&gt;

&lt;p&gt;We recently saw a rapid increase in our backend project, reaching over 1000 active users in just 5 days. However, this spike led to latency issues, with API calls averaging around 200ms. Initially, we used Redis for caching, but latency remained between 180-200ms because our Redis instance and main server were both in the US-West region, while our users were primarily in India.&lt;/p&gt;

&lt;p&gt;To address this, we implemented in-memory caching on the server, reducing latency by approximately 60%.&lt;/p&gt;

&lt;p&gt;Here's how to implement in-memory caching using Node.js and Express.js:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;- Install the node cache package&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install node-cache&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-  Setup your Cache&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;const NodeCache = require('node-cache');
const myCache = new NodeCache({ stdTTL: 100, checkperiod: 120 });

// stdTTL is the default time-to-live for cache entries (in seconds)
// checkperiod is the interval for automatic cache cleaning (in seconds)

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;-  Implement in the express js server&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;const express = require('express');
const app = express();

// Example data fetching function
async function fetchDataFromDatabase() {
    // Simulate a database call
    return { data: 'This is some data from the database.' };
}

app.get('/data', async (req, res) =&amp;gt; {
    const cacheKey = 'myDataKey';
    const cachedData = myCache.get(cacheKey);

    if (cachedData) {
        return res.json({ source: 'cache', data: cachedData });
    }

    const data = await fetchDataFromDatabase();
    myCache.set(cacheKey, data);
    res.json({ source: 'database', data });
});

const PORT = process.env.PORT || 3000;
app.listen(PORT, () =&amp;gt; {
    console.log(`Server is running on port ${PORT}`);
});

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;-  Manage your cache&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;// Get cache statistics
console.log(myCache.getStats());

// Manually delete a cache entry
myCache.del('myDataKey');

// Flush the entire cache
myCache.flushAll();

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

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>node</category>
      <category>database</category>
    </item>
    <item>
      <title>Unlocking Affordable Storage Magic: Our Journey with Uploadthing! 🚀✨</title>
      <dc:creator>shubham paul</dc:creator>
      <pubDate>Tue, 25 Jun 2024 15:27:59 +0000</pubDate>
      <link>https://forem.com/shu12388y/unlocking-affordable-storage-magic-our-journey-with-uploadthing-41ma</link>
      <guid>https://forem.com/shu12388y/unlocking-affordable-storage-magic-our-journey-with-uploadthing-41ma</guid>
      <description>&lt;p&gt;I was working on a project where we have to store PDFs in a storage bucket or any storage solution. Initially, we were storing the PDFs in an AWS S3 bucket so that users could easily access the content of the PDFs. However, as we know, the pricing of the S3 bucket is high.🔥.&lt;/p&gt;

&lt;p&gt;So, we are looking for some good alternative solutions that we can use with a good pricing model.&lt;/p&gt;

&lt;p&gt;I have been following Theo for the last six months and love watching his YouTube videos. From that, I learned about Uploadthing. &lt;/p&gt;

&lt;p&gt;Uploadthing is a modern file storage solution designed to meet the diverse needs of developers and businesses. Whether you're storing documents, images, or other types of files, Uploadthing offers a straightforward and cost-effective option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Generous Free Tier: Uploadthing provides 10 GB of free storage space, making it an excellent choice for startups and small projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Affordable Pricing: For just $10 per month, you can access 100 GB of storage, offering a cost-effective alternative to traditional storage solutions like AWS S3. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you are building your application in Next.js, the integration of Uploadthing with Next.js is smooth as butter.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>aws</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>We just migrate from Google analysis to PostHog</title>
      <dc:creator>shubham paul</dc:creator>
      <pubDate>Fri, 07 Jun 2024 14:50:46 +0000</pubDate>
      <link>https://forem.com/shu12388y/we-just-migrate-from-google-analysis-to-posthog-a6d</link>
      <guid>https://forem.com/shu12388y/we-just-migrate-from-google-analysis-to-posthog-a6d</guid>
      <description>&lt;p&gt;In our project's we are using google analysis to track user details&lt;/p&gt;

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

&lt;p&gt;What is google analysis ?&lt;br&gt;
Google Analytics is a powerful web analytics service offered by Google that tracks and reports website traffic. It was launched in November 2005 after Google acquired Urchin Software Corporation. Over the years, Google Analytics has become one of the most widely used web analytics services on the internet.&lt;/p&gt;

&lt;p&gt;In our company, we used Google Analytics for every project to analyze user behavior and track the number of active users on our websites and applications. Everything was working fine, but we wanted to explore different tools to test their compatibility and see if they could offer additional features for our applications.&lt;/p&gt;

&lt;p&gt;That’s when we discovered PostHog.&lt;/p&gt;

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

&lt;p&gt;PostHog is an open-source product analytics platform designed to provide detailed insights into user behavior and product usage. Launched in early 2020, PostHog aims to offer an alternative to traditional analytics tools by focusing on privacy, flexibility, and the ability to self-host. This makes it particularly attractive to companies that prioritize data ownership and customization.&lt;/p&gt;

&lt;p&gt;We have been using PostHog for a week, and here are some of its features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Event Tracking: PostHog allows us to track custom events to understand user interactions with our product. This helps us gain deeper insights into user behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Session Recording: With session recording, we can visualize user interactions and identify usability issues. This feature is invaluable for improving user experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Feature Flags: PostHog provides feature flags that enable us to test and gradually roll out new features. This helps us control which users see specific features and conduct A/B testing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User Paths: The user paths feature visualizes how users navigate through our product. This helps us identify common drop-off points and optimize user flows.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Retention Analysis: PostHog’s retention analysis allows us to understand how well our product retains users over time. We can identify patterns and factors that influence user retention.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Self-Hosting: PostHog offers the option to self-host, giving us complete control over our data and ensuring compliance with privacy regulations. This is a significant advantage for data security and privacy.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We are excited about the possibilities that PostHog offers and look forward to leveraging these features to enhance our product and user experience.&lt;/p&gt;

&lt;p&gt;We are now in the testing phase of PostHog, and so far, we are impressed with its capabilities. If our testing continues to show positive results, we plan to stick with PostHog for the long term.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>google</category>
      <category>posthog</category>
    </item>
    <item>
      <title>Fixing the Render Free Tier Sleep Issue for Strapi CMS</title>
      <dc:creator>shubham paul</dc:creator>
      <pubDate>Sat, 01 Jun 2024 13:01:23 +0000</pubDate>
      <link>https://forem.com/shu12388y/fixing-the-render-free-tier-sleep-issue-for-strapi-cms-d92</link>
      <guid>https://forem.com/shu12388y/fixing-the-render-free-tier-sleep-issue-for-strapi-cms-d92</guid>
      <description>&lt;p&gt;I am working on a project where the backend is deployed on Render, using Strapi CMS. One challenge with the Render free tier is that the server goes to sleep after 15 minutes of inactivity. This causes delays when developing the frontend, as the data takes too long to load initially, slowing down my development process.&lt;/p&gt;

&lt;p&gt;To address this, I thought of a solution: pinging the server every 10 minutes to prevent it from going to sleep. This way, the response times will remain optimal. I wrote a basic JavaScript program to achieve this.&lt;br&gt;
Let's see the code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import axios from "axios";
let i = 1;
async function apiCronJob(){
    try{
            const data = await axios.get("your server endpoitn");
            if(data){
                console.log("request number is: ",i)
            }
            i++;
    }
    catch(e){
            console.log(e)
    }
}


setInterval(apiCronJob,600000);

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

&lt;/div&gt;



&lt;p&gt;You can run this code in your computer are make a cron job or worker that will run code.&lt;/p&gt;

&lt;p&gt;Comment down your solutions&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
