<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mudassir Ali on Medium]]></title>
        <description><![CDATA[Stories by Mudassir Ali on Medium]]></description>
        <link>https://medium.com/@mudassirali_79816?source=rss-24c789dde737------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LFc7LwM7YwUZJUggRjkhHg.png</url>
            <title>Stories by Mudassir Ali on Medium</title>
            <link>https://medium.com/@mudassirali_79816?source=rss-24c789dde737------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 00:15:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mudassirali_79816/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How To Create Background Worker Thread in Node Js]]></title>
            <link>https://medium.com/@mudassirali_79816/how-to-create-background-worker-thread-in-node-js-fa7ef7498fad?source=rss-24c789dde737------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa7ef7498fad</guid>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[clustering]]></category>
            <category><![CDATA[workerthreads]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Mudassir Ali]]></dc:creator>
            <pubDate>Wed, 20 Aug 2025 07:39:48 GMT</pubDate>
            <atom:updated>2025-08-20T07:39:48.162Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*2aLKWLTrNv6QyPH4H9Y4EQ.png" /></figure><p>To create a background worker thread in Node.js, you can use the <strong>Worker Threads</strong> module. This module allows you to run JavaScript code in parallel, making it ideal for handling CPU-intensive tasks without blocking the main thread.</p><p>To solve this, Node.js introduced the <strong>Worker Threads module</strong>. Worker threads allow us to run CPU-bound tasks in the background without freezing the main thread.</p><h3>1. Single Thread (Default Node.js Behavior)</h3><h4>What it is</h4><p>Node.js runs JavaScript using a <strong>single thread</strong> (main thread), built on top of the <strong>event loop</strong> and <strong>non-blocking I/O</strong>. It’s great for I/O-heavy operations but <strong>not</strong> for CPU-heavy work.</p><h3>CPU Load Handle</h3><p>CPU load happens when we are handling heavy tasks such as ( bcrypt round hashing, image processing) that kind of task we are not using the main thread because this task is blocking our main thread and it slows the other request. So, for that we are using Queues like (BullMQ) or external microservices. So, our main thread is free and it can handle another request.</p><h4>Options for CPU load manage</h4><ol><li><strong>Option 01:</strong> we have the first option to run a thread on background for that heavy task. to using a background thread, it will free our main event loop for another request handle</li><li><strong>Option 02:</strong> the 2nd option is to add the task in the queue like BullMQ, RabbitMQ, and process the task that is scalable option</li><li><strong>Option 03:</strong> the 3rd option is to use the external microserves cloud for the image resize image processing and bcrypt.</li></ol><p><strong>in this article we will use the Option: 1, is to make background thread.</strong></p><h4>Lets dive into the code to start the project</h4><p>i am using MVC architecture here is my folder structure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/199/1*TrPwyhpIBfdsO4EGaPcv0Q.png" /><figcaption>folder structure MVC</figcaption></figure><p>As you can see in the image above, I have a worker&#39;s directory, and inside it, I’ve created a separate worker thread for hashing passwords.</p><p><strong>/src/workers/hash.worker.ts</strong></p><pre>import { workerData, parentPort } from &quot;node:worker_threads&quot;;<br>import bcrypt from &quot;bcrypt&quot;;<br><br>(async () =&gt; {<br>    try {<br>        const salt = await bcrypt.genSalt(workerData.saltRounds);<br>        const hash = await bcrypt.hash(workerData.password, salt);<br>        parentPort?.postMessage(hash);<br>    } catch (error: any) {<br>        parentPort?.postMessage({ error: error.message });<br>    }<br>})();</pre><p>This is the worker thread where I use bcrypt to generate salt and hash the password. The <strong>parentPort</strong> sends a message, and the service file listens for that data.</p><p><strong>/src/services/auth.service.ts</strong></p><pre>async register(username: string, email: string, password: string) {<br>        try {<br>            if (!email || !password) {<br>                throw new ValidationError(&#39;Email and Password are required&#39;);<br>            }<br><br>            // existing user<br>            const existing_email = await prisma.user.findFirst({<br>                where: {<br>                    email: {<br>                        equals: email,<br>                        mode: &#39;insensitive&#39;<br>                    }<br>                }<br>            });<br><br>            if (existing_email) {<br>                throw new ConflictError(&quot;User with this email already exist&quot;);<br>            }<br>            const accessToken = generateToken(email);<br><br>            const hash = await this.hashPasswordInWorker(password);<br>            const user = await prisma.user.create({<br>                data: {<br>                    username: username,<br>                    email: email,<br>                    password: hash<br>                }<br>            });<br>            return {<br>                user,<br>                accessToken<br>            };<br>        } catch (error: any) {<br>            throw new CustomError(error.message, error.statusCode);<br><br>        }<br><br>    },<br><br> <br><br>    async hashPasswordInWorker(password: string): Promise&lt;string&gt; {<br>        return new Promise((resolve, reject) =&gt; {<br>            const workerPath = path.join(__dirname, &#39;..&#39;, &#39;..&#39;, &#39;workers&#39;, &#39;hash.worker.ts&#39;);<br><br>            const worker = new Worker(workerPath, {<br>                workerData: { password, saltRounds: 10 },<br>                execArgv: [&#39;-r&#39;, &#39;ts-node/register&#39;]<br>            });<br><br>            worker.on(&#39;message&#39;, (result) =&gt; {<br>                if (result?.error) {<br>                    reject(new Error(result.error));<br>                } else {<br>                    resolve(result);<br><br>                }<br>            });<br><br>            worker. On(&#39;error&#39;, reject);<br>            worker.on(&#39;exit&#39;, (code) =&gt; {<br>                if (code !== 0)<br>                    reject(new Error(`Worker stopped with exit code ${code}`));<br>            });<br>        });<br>    }</pre><p>This is the service file responsible for creating user accounts. The <strong>hashPasswordInWorker</strong> function listens for data from the main thread. I pass in the <strong>workerData</strong>, which includes the user’s password entered during account creation, along with a salt round value of 10.</p><p>in simple words:</p><ul><li>We create a new worker with Worker().</li><li>Send password + saltRounds to the worker with postMessage().</li><li>Listen for results using worker.on(&quot;message&quot;).</li><li>Terminate the worker after finishing.</li></ul><h3>Conclusion</h3><p>By using <strong>worker threads in Node.js</strong>, you can run <strong>CPU-bound tasks in the background</strong> without blocking the main event loop.</p><p>In this tutorial, we:</p><ul><li>Created a worker thread (worker.js).</li><li>Sent data from the main thread.</li><li>Hashed a password using <strong>bcrypt</strong>.</li><li>Received the result asynchronously.</li></ul><p>Now your Node.js app can remain responsive, even during heavy computations.</p><p><strong>Tip: </strong>You can extend this pattern to multiple workers or use a worker pool for better scalability.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa7ef7498fad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multer File upload using Nest Js]]></title>
            <link>https://medium.com/etechviral/multer-file-upload-using-nest-js-f19a922334a6?source=rss-24c789dde737------2</link>
            <guid isPermaLink="false">https://medium.com/p/f19a922334a6</guid>
            <category><![CDATA[nestjs]]></category>
            <category><![CDATA[multer]]></category>
            <category><![CDATA[file-uploading]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[node-js-tutorial]]></category>
            <dc:creator><![CDATA[Mudassir Ali]]></dc:creator>
            <pubDate>Sat, 22 Feb 2025 07:17:14 GMT</pubDate>
            <atom:updated>2025-02-22T07:17:14.403Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*wPk3m2E083fUIyz0eRyqrA.png" /></figure><h4><strong>What is Multer?</strong></h4><p>Multer is like a friendly helper for your Node.js app that handles file uploads (like images, PDFs, or videos). When users send files through a form, Multer grabs those files, saves them to your server (or cloud storage), and tells your app where they’re stored. It’s simple to use — just plug it into your code, and boom, you’re ready to accept uploads!</p><h4>Making multer global in project</h4><p>To make Multer global in your project and reusable across multiple modules, you can create a separate module dedicated to file uploads. This approach centralizes your file upload logic and makes it easier to reuse in other parts of your project.</p><h3>Steps to Create a Global Multer Module</h3><h4>1. Create a FileUploadModule</h4><p>This module will contain all the configurations and logic for file uploads.</p><h4>File Structure:</h4><pre><br>src/<br>├── shared/<br>│   ├── file-upload/<br>│   │   ├── file-upload.module.ts<br>│   │   ├── file-upload.service.ts<br>│   │   ├── multer.config.ts<br>│   │   └── file-upload.interceptor.ts</pre><h4>2. Define Multer Configurations</h4><pre><br>// multer.config.ts<br>import { diskStorage } from &#39;multer&#39;;<br>import { extname } from &#39;path&#39;;<br><br>export const multerConfig = {<br>  storage: diskStorage({<br>    destination: &#39;./uploads&#39;, // Directory where files will be stored<br>    filename: (req, file, callback) =&gt; {<br>      const uniqueSuffix = Date.now() + &#39;-&#39; + Math.round(Math.random() * 1e9);<br>      const fileExt = extname(file.originalname);<br>      const fileName = `${file.fieldname}-${uniqueSuffix}${fileExt}`;<br>      callback(null, fileName);<br>    },<br>  }),<br>};<br><br>export const fileFilter = (req, file, callback) =&gt; {<br>  // Allow only image files<br>  if (!file.mimetype.match(/\/(jpg|jpeg|png)$/)) {<br>    return callback(new Error(&#39;Only image files are allowed&#39;), false);<br>  }<br>  callback(null, true);<br>};<br><br></pre><h4>3. Create a Global File Upload Interceptor</h4><pre>// file-upload.interceptor.ts<br>import { Injectable } from &#39;@nestjs/common&#39;;<br>import { FileInterceptor } from &#39;@nestjs/platform-express&#39;;<br>import { multerConfig, fileFilter } from &#39;./multer.config&#39;;<br><br>@Injectable()<br>export class FileUploadInterceptor extends FileInterceptor(&#39;file&#39;, {<br>  storage: multerConfig.storage,<br>  fileFilter: fileFilter,<br>  limits: { fileSize: 5 * 1024 * 1024 }, // Limit file size to 5MB<br>}) {}<br><br></pre><h4>4. Create the File Upload Service</h4><pre>// file-upload.service.ts<br>import { Injectable } from &#39;@nestjs/common&#39;;<br>import { join } from &#39;path&#39;;<br><br>@Injectable()<br>export class FileUploadService {<br>  getFilePath(filename: string): string {<br>    return join(process.cwd(), &#39;uploads&#39;, filename);<br>  }<br><br>  getPublicFilePath(filename: string): string {<br>    return `/uploads/${filename}`;<br>  }<br>}<br><br></pre><h4>5. Create the File Upload Module</h4><pre>// file-upload.module.ts<br><br>import { Module } from &#39;@nestjs/common&#39;;<br>import { MulterModule } from &#39;@nestjs/platform-express&#39;;<br>import { FileUploadService } from &#39;./file-upload.service&#39;;<br>import { multerConfig } from &#39;./multer.config&#39;;<br><br>@Module({<br>  imports: [<br>    MulterModule.register({<br>      storage: multerConfig.storage,<br>      fileFilter: multerConfig.fileFilter,<br>    }),<br>  ],<br>  providers: [FileUploadService],<br>  exports: [FileUploadService, MulterModule],<br>})<br>export class FileUploadModule {}<br><br></pre><h4>6. Use File Upload Globally</h4><p><em>Import FileUploadModule in Your App Module:</em></p><pre>// app.module.ts<br>import { Module } from &#39;@nestjs/common&#39;;<br>import { FileUploadModule } from &#39;./shared/file-upload/file-upload.module&#39;;<br>import { UsersModule } from &#39;./users/users.module&#39;;<br>import { ProductsModule } from &#39;./products/products.module&#39;;<br><br>@Module({<br>  imports: [<br>    FileUploadModule, // Global file upload module<br>    UsersModule,<br>    ProductsModule,<br>  ],<br>})<br>export class AppModule {}<br><br></pre><h4>Inject and Use the Interceptor in Controllers:</h4><pre>// users.controller.ts<br>import {<br>  Body,<br>  Controller,<br>  Patch,<br>  UseGuards,<br>  UseInterceptors,<br>  UploadedFile,<br>} from &#39;@nestjs/common&#39;;<br>import { FileUploadInterceptor } from &#39;src/shared/file-upload/file-upload.interceptor&#39;;<br>import { UsersService } from &#39;./users.service&#39;;<br>import { UpdateUserDto } from &#39;./dto/update-user.dto&#39;;<br>import { CustomJwtAuthGuard } from &#39;src/guards/jwt.guard&#39;;<br><br>@Controller(&#39;users&#39;)<br>export class UsersController {<br>  constructor(private readonly usersService: UsersService) {}<br><br>  @Patch(&#39;user&#39;)<br>  @UseGuards(CustomJwtAuthGuard)<br>  @UseInterceptors(FileUploadInterceptor)<br>  async updateUser(<br>    @Body() body: UpdateUserDto,<br>    @UploadedFile() file: Express.Multer.File,<br>  ) {<br>    if (file) {<br>      body.image = `/uploads/${file.filename}`;<br>    }<br>    return this.usersService.updateUserInformation(body);<br>  }<br>}</pre><h4>7. Serve Static Files</h4><p>Add the following in your main.ts file to serve the uploaded files publicly:</p><pre>import { NestFactory } from &#39;@nestjs/core&#39;;<br>import { AppModule } from &#39;./app.module&#39;;<br>import { join } from &#39;path&#39;;<br><br>async function bootstrap() {<br>  const app = await NestFactory.create(AppModule);<br><br>  // Serve static assets<br>  app.useStaticAssets(join(__dirname, &#39;..&#39;, &#39;uploads&#39;), {<br>  prefix: &quot;/uploads/&quot;, // for global directory like /backend/aladin/uploads<br>  });<br>  <br>  <br>  // app.useStaticAssets(join(__dirname, &#39;..&#39;, &#39;src&#39;, &#39;uploads&#39;), {<br> //  prefix: &quot;/uploads/&quot;, // for src directory like /backend/aladin/src/uploads<br>//   });<br><br>  await app.listen(3000);<br>}<br>bootstrap();</pre><h3>Benefits of This Approach</h3><ol><li><strong>Centralized Configuration</strong>:</li></ol><ul><li>All Multer-related logic is in one place, making it easy to maintain and update.</li></ul><ol><li><strong>Reusability</strong>:</li></ol><ul><li>The FileUploadModule can be used in any other module (e.g., ProductsModule, EventsModule).</li></ul><ol><li><strong>Scalability</strong>:</li></ol><ul><li>Add custom logic like file type validation, cloud storage integration (e.g., AWS S3, Google Cloud), etc., without affecting other parts of the app.</li></ul><ol><li><strong>Clean Separation</strong>:</li></ol><ul><li>Separation of concerns makes the project easier to read and debug.</li></ul><h3>Facing Errors In Multer</h3><p>The error is happening because useStaticAssets is not directly available in the INestApplication interface if you&#39;re using the default HTTP adapter. You need to explicitly cast the app instance to NestExpressApplication from @nestjs/platform-express for useStaticAssets to work.</p><p>Here’s how you can fix it:</p><p><strong>Updated main.ts</strong></p><pre><br>import { NestFactory } from &#39;@nestjs/core&#39;;<br>import { AppModule } from &#39;./app.module&#39;;<br>import { DocumentBuilder, SwaggerModule } from &#39;@nestjs/swagger&#39;;<br>import { join } from &#39;path&#39;;<br>import * as cookieParser from &#39;cookie-parser&#39;;<br>import { NestExpressApplication } from &#39;@nestjs/platform-express&#39;;<br><br>async function bootstrap() {<br>  const app = await NestFactory.create&lt;NestExpressApplication&gt;(AppModule);<br><br>  app.enableCors({<br>    origin: [&quot;http://localhost:3000&quot;, &quot;http://localhost:3001&quot;],<br>    credentials: true,<br>  });<br><br>  app.use(cookieParser());<br>  app.setGlobalPrefix(&quot;api&quot;);<br><br>  // Serve static assets<br>  app.useStaticAssets(join(__dirname, &#39;..&#39;, &#39;public&#39;));<br><br>  const config = new DocumentBuilder() // configure the metadata for Swagger documentation<br>    .setTitle(&#39;your api&#39;)<br>    .setDescription(&#39;API documentation for your project&#39;)<br>    .setVersion(&#39;1.0&#39;)<br>    .addBearerAuth()<br>    .build();<br><br>  const document = SwaggerModule.createDocument(app, config);<br>  SwaggerModule.setup(&#39;api&#39;, app, document);<br><br>  await app.listen(process.env.PORT ?? 5000);<br>}<br>bootstrap();<br><br></pre><h4>Key Changes</h4><ol><li><strong>Cast </strong><strong>NestApplication to </strong><strong>NestExpressApplication:</strong></li></ol><pre><br>const app = await NestFactory.create&lt;NestExpressApplication&gt;(AppModule);<br></pre><ul><li>This cast ensures you have access to methods like useStaticAssets provided by @nestjs/platform-express.</li></ul><ol><li><strong>useStaticAssets Works Properly:</strong> The cast allows useStaticAssets to work without type errors.</li></ol><h4>Why the Error Happens</h4><p>useStaticAssets is a method provided by the NestExpressApplication class, which is available only when using the @nestjs/platform-express adapter. The default INestApplication type does not include these methods, so you must explicitly cast the app instance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f19a922334a6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/etechviral/multer-file-upload-using-nest-js-f19a922334a6">Multer File upload using Nest Js</a> was originally published in <a href="https://medium.com/etechviral">ETechViral</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Authentication with NextAuth in a Next.js App]]></title>
            <link>https://medium.com/etechviral/google-authentication-with-nextauth-in-a-next-js-app-2b08c152b757?source=rss-24c789dde737------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b08c152b757</guid>
            <category><![CDATA[google-authentication]]></category>
            <category><![CDATA[nextauth]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Mudassir Ali]]></dc:creator>
            <pubDate>Sun, 20 Oct 2024 15:23:53 GMT</pubDate>
            <atom:updated>2025-06-26T06:02:59.381Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*i6fw9xUs3JWxae03mouotg.png" /></figure><p>In this article, I’ll walk you through setting up Google authentication in a Next.js app using NextAuth, covering both the backend and frontend integration. Here’s how I implemented it in one of my projects!</p><h3>Why Use NextAuth?</h3><p>NextAuth provides a simple, secure way to integrate authentication in Next.js applications. It supports many authentication providers, including Google, making it a great choice for projects that require user authentication.</p><h3>Backend: Setting Up NextAuth</h3><ol><li><strong>Install NextAuth</strong></li></ol><pre><br>npm install next-auth</pre><p><strong>2. Environment Variables</strong></p><p>First, set up your environment variables for Google authentication</p><pre>GOOGLE_CLIENT_ID=your-google-client-id<br>GOOGLE_CLIENT_SECRET=your-google-client-secret<br>NEXTAUTH_SECRET=your-secret-key</pre><p><strong>3. NextAuth Configuration</strong></p><p>Here’s the complete setup for authentication with Google and credentials using NextAuth in pages/api/auth/[...nextauth].js.</p><pre>import NextAuth from &#39;next-auth&#39;;<br>import GoogleProvider from &#39;next-auth/providers/google&#39;;<br>import CredentialsProvider from &#39;next-auth/providers/credentials&#39;;<br>import bcrypt from &#39;bcrypt&#39;;<br>import connect from &#39;../../../../utils/db/connect.js&#39;;<br>import User from &#39;../../../../models/user.model&#39;;<br>import rateLimit from &#39;../../../../utils/rate-limit.js&#39;;<br>import { csrfToken } from &#39;next-auth/react&#39;; <br><br><br>const SALT_ROUNDS = 12;<br><br><br>const limiter = rateLimit({<br>  windowMs: 60 * 1000, <br>  max: 5, <br>  message: &quot;Too many login attempts, please try again later.&quot;<br>});<br><br>const handler = NextAuth({<br>  providers: [<br>    GoogleProvider({<br>      clientId: process.env.GOOGLE_CLIENT_ID,<br>      clientSecret: process.env.GOOGLE_CLIENT_SECRET,<br>    }),<br>    CredentialsProvider({<br>      name: &quot;Credentials&quot;,<br>      credentials: {<br>        email: { label: &quot;Email&quot;, type: &quot;email&quot; },<br>        password: { label: &quot;Password&quot;, type: &quot;password&quot; },<br>      },<br>      async authorize(credentials, req) {<br>    <br>        await limiter(req);<br><br>        await connect();<br><br>        const user = await User.findOne({ email: credentials.email });<br>        if (!user) {<br>          throw new Error(&#39;Invalid login credentials&#39;); <br>        }<br><br>        const isValidPassword = await bcrypt.compare(credentials.password, user.password);<br>        if (!isValidPassword) {<br>          throw new Error(&#39;Invalid login credentials&#39;);<br>        }<br><br>        return user;<br>      },<br>    }),<br>  ],<br>  secret: process.env.NEXTAUTH_SECRET,<br>  session: {<br>    strategy: &#39;jwt&#39;,<br>    maxAge: 3 * 24 * 60 * 60, <br><br>    cookie: {<br>      secure: process.env.NODE_ENV === &#39;production&#39;, <br>      httpOnly: true, <br>      sameSite: &#39;Strict&#39;, <br>    },<br>  },<br>  pages: {<br>    signIn: &#39;/auth/login&#39;,<br>  },<br>  callbacks: {<br>    async jwt({ token, user }) {<br>      if (user) token.id = user.id;<br>      return token;<br>    },<br>    async session({ session, token }) {<br>      session.user.id = token.id;<br>      return session;<br>    },<br>  },<br> <br>  events: {<br>    error(message) {<br>      console.error(message);<br>    },<br>  },<br>  <br>  csrf: true,<br>});<br><br>export { handler as GET, handler as POST };<br><br><br>import rateLimit from &#39;express-rate-limit&#39;;<br><br>const rateLimitMiddleware = (options) =&gt; {<br>  const limiter = rateLimit({<br>    ...options,<br>    handler: (req, res) =&gt; {<br>      res.status(429).json({ error: &#39;Too many requests, please try again later.&#39; });<br>    },<br>  });<br><br>  return (req, res, next) =&gt; limiter(req, res, next);<br>};<br><br>export default rateLimitMiddleware;</pre><h3>Frontend: Google Authentication UI</h3><p>Next, let’s set up the frontend to handle Google authentication. Here’s the code for the sign-up page using NextAuth’s signIn method for Google authentication.</p><pre>&quot;use client&quot;;<br>import React, { useEffect } from &quot;react&quot;;<br>import Image from &quot;next/image&quot;;<br>import google from &quot;../../../public/images/google.svg&quot;;<br>import styles from &quot;./styles.module.css&quot;;<br>import { signIn, useSession } from &quot;next-auth/react&quot;;<br>import { useRouter } from &quot;next/navigation&quot;;<br>import Link from &quot;next/link&quot;;<br><br>const SignUp = () =&gt; {<br>  const { data: session, status } = useSession();<br>  const router = useRouter();<br><br>  useEffect(() =&gt; {<br>    if (session) {<br>  <br>      router.push(&quot;/&quot;);<br>    }<br>  }, [session, router]);<br><br><br>  if (status === &quot;loading&quot;) return &lt;p&gt;Loading...&lt;/p&gt;;<br>  if (session) return null;<br><br><br>  const handleSignIn = async () =&gt; {<br>    try {<br>      await signIn(&quot;google&quot;, { callbackUrl: &quot;/&quot; });<br>    } catch (error) {<br>      console.error(&quot;Sign in failed:&quot;, error);<br><br>      alert(&quot;Sign-in failed, please try again.&quot;);<br>    }<br>  };<br><br>  return (<br>    &lt;section className={styles.section}&gt;<br>      &lt;div className={styles.row}&gt;<br>        {/* Left Column */}<br>        &lt;div className={styles.left_col}&gt;<br>          &lt;Link href=&quot;/login&quot; className={styles.box}&gt;<br>            &lt;h1&gt;Welcome back&lt;/h1&gt;<br>            &lt;p&gt;<br>              It is a long established fact that a reader will be distracted by the readable.<br>            &lt;/p&gt;<br>          &lt;/Link&gt;<br>        &lt;/div&gt;<br><br><br>        &lt;div className={styles.right_col}&gt;<br>          &lt;main className={styles.main}&gt;<br>            &lt;h1 className={styles.title}&gt;Sign up with Google&lt;/h1&gt;<br>            &lt;button<br>              className={styles.googleButton}<br>              onClick={handleSignIn} // Secure sign-in process with error handling<br>            &gt;<br>              &lt;Image src={google} alt=&quot;Google logo&quot; /&gt; Sign up with Google<br>            &lt;/button&gt;<br>          &lt;/main&gt;<br>        &lt;/div&gt;<br>      &lt;/div&gt;<br>    &lt;/section&gt;<br>  );<br>};<br><br>export default SignUp;</pre><h3>Final Thoughts</h3><p>Google authentication with NextAuth is straightforward, and with the right setup, you can handle both backend and frontend integrations seamlessly. Make sure to test your implementation thoroughly before deploying.</p><p><strong>Key Points:</strong></p><ul><li>Use <strong>NextAuth</strong> to simplify authentication processes.</li><li>Store sensitive data like Google client ID and secret in environment variables.</li><li>Customize the sign-in and session handling to suit your application’s needs.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b08c152b757" width="1" height="1" alt=""><hr><p><a href="https://medium.com/etechviral/google-authentication-with-nextauth-in-a-next-js-app-2b08c152b757">Google Authentication with NextAuth in a Next.js App</a> was originally published in <a href="https://medium.com/etechviral">ETechViral</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tor Browser 14.0a7: A New Alpha Release]]></title>
            <link>https://medium.com/@mudassirali_79816/tor-browser-14-0a7-a-new-alpha-release-13960124532b?source=rss-24c789dde737------2</link>
            <guid isPermaLink="false">https://medium.com/p/13960124532b</guid>
            <category><![CDATA[anonymous]]></category>
            <category><![CDATA[tor]]></category>
            <category><![CDATA[browsers]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[protection]]></category>
            <dc:creator><![CDATA[Mudassir Ali]]></dc:creator>
            <pubDate>Sun, 29 Sep 2024 07:43:56 GMT</pubDate>
            <atom:updated>2024-09-29T07:43:56.418Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*qssHNETqwQTLJ0V4Fy-maw.jpeg" /></figure><blockquote>Tor Browser 14.0a7 is the first release candidate for version 14.0. It includes all the features found in the previous version, 13.5. Moving forward, the focus will be on quality assurance and fixing any bugs. Another release candidate is expected next week, with the official release of Tor Browser 14.0 planned for October 14.</blockquote><p><strong>Download Alpha version:</strong> <a href="https://www.torproject.org/download/">https://www.torproject.org/download/</a></p><p>Tor Browser, the powerful anonymous search tool, has recently released its latest alpha version 14.0a7. This new update brings a variety of improvements, including bug fixes, security enhancements, and other features designed to further protect your online privacy.</p><h3>Major fixes in Tor Browser 14.0a7</h3><h4>1. Enhanced Security:</h4><p><strong>New OpenSSL library:</strong> The browser’s underlying security library has been updated to address potential vulnerabilities.</p><p><strong>Tor network enhancements:</strong> The Tor network itself has undergone enhancements to increase anonymity and reliability.</p><p><strong>Extension Security:</strong> Security checks have been done to mitigate potential risks in a browser’s extension ecosystem.</p><p><strong>Debugging and Status:</strong> Several bugs and bugs have been addressed, improving the overall user experience and browser stability. The Tor network, user interface, and extensibility issues are addressed.</p><h4>2. New Features:</h4><p><strong>HTTPS Everywhere Integration :</strong> The browser now seamlessly works with HTTPS Everywhere, which is a browser extension that automatically forwards HTTP requests over HTTPS, providing additional security</p><h4>3. Why choose Tor Browser?</h4><p>Tor Browser offers several benefits for those seeking privacy online and anonymously.</p><p><strong>It masks your location:</strong> It hides your IP address, making it harder for websites or trackers to find your location. <strong>Protects against censorship:</strong> Tor allows you to access blocked websites and content, even in countries with strict internet censorship.</p><p><strong>Improves Internet Security:</strong> By encrypting your Internet traffic, Tor helps protect your data from third-party interception.</p><h4>conclusion</h4><p>Tor Browser 14.0a7 is an important step towards providing users with a secure and private browsing experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13960124532b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Approach to Learning New Technologies]]></title>
            <link>https://medium.com/@mudassirali_79816/my-approach-to-learning-new-technologies-ef28bf13d7bb?source=rss-24c789dde737------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef28bf13d7bb</guid>
            <category><![CDATA[notion]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[skills]]></category>
            <dc:creator><![CDATA[Mudassir Ali]]></dc:creator>
            <pubDate>Sun, 22 Sep 2024 06:21:43 GMT</pubDate>
            <atom:updated>2024-09-22T06:21:43.986Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A2XWJ-eR8cGCD43PQbKcfw.jpeg" /></figure><p>In today’s fast-moving tech world, staying updated with new skills is essential. Over time, I’ve developed a technique that helps me learn efficiently and build strong fundamentals.</p><h4>Here’s my learning approach:</h4><p>1 <strong>Start with Official Documentation</strong></p><p>Whenever I start learning a new technology, I turn to the official docs first. They provide the most accurate and structured information, helping me understand the tool or concept better.</p><p>2 <strong>Organize with Notion</strong></p><p>I use Notion to keep everything organized. On my homepage, I have categories for:</p><ul><li><strong>Online Resources</strong>: A place to store useful links, articles, and tutorials.</li><li><strong>Technology-Specific Notes</strong>: For example, I have a section dedicated to Next.js, where I capture everything I learn. This becomes a handy reference I can always return to.</li></ul><p>3️ <strong>Watch Videos</strong></p><p>If something’s unclear, I quickly find a YouTube video (around 50 minutes) to explain it. Combining reading with videos helps me grasp concepts faster.</p><p><strong>Why This Works for Me</strong></p><p>By creating my own notes and using different learning sources, I understand and retain information better. It’s a mix of structure, flexibility, and active learning that makes the process effective.</p><p><strong>Pro Tip</strong>: Break down difficult topics and use multiple formats (text, video, etc.) to help reinforce learning.</p><p>How do you learn new skills or stay updated with tech? I’d love to hear your approach in the comments below! 👇</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef28bf13d7bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Login API Integration: A Step-By-Step Guide]]></title>
            <link>https://medium.com/@mudassirali_79816/login-api-integration-a-step-by-step-guide-3e9174f5246a?source=rss-24c789dde737------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e9174f5246a</guid>
            <category><![CDATA[api-integration]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Mudassir Ali]]></dc:creator>
            <pubDate>Tue, 03 Sep 2024 16:28:48 GMT</pubDate>
            <atom:updated>2024-09-03T16:28:48.241Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3oacUN_Yc_LVIjzIeTa2Eg.jpeg" /></figure><p>Integrating an API into your application is crucial for extending its functionality, whether it’s for user authentication, data retrieval, or interacting with external services. In this guide, we’ll explore how to integrate an API effectively, using production-level code that ensures reliability and security.</p><h4>Setting Up Your Project</h4><p>A well-organized project structure is fundamental for managing different parts of your application. Here’s a recommended structure</p><p><strong>Folder Structure Example:</strong></p><ul><li>backend/ - Contains server-side code and API configurations.</li><li>frontend/ - Contains client-side code like HTML, CSS, and JavaScript files.</li><li>services/ - Houses files responsible for making API requests and handling responses.</li><li>components/ - Contains reusable UI components.</li><li>pages/ - Represents different pages of your application.</li><li>hooks/ - Custom React hooks for handling logic.</li></ul><p>Having this organized structure helps in maintaining the codebase and improves scalability.</p><h4>Creating an HTTP Service for API Requests</h4><p>To handle API requests efficiently, set up an HTTP service that uses a library like Axios to simplify HTTP operations. Here’s how you can configure an HTTP service in a production-ready way.</p><pre>// http.service.js<br>import axios from &quot;axios&quot;;<br><br>const requests = axios.create({<br>  baseURL: &quot;http://paste-the-api-base-url&quot;,<br>  headers: {<br>    Accept: &quot;application/json&quot;,<br>    &quot;Content-Type&quot;: &quot;application/json&quot;,<br>    &quot;rgrok-skip-browser-warning&quot;: true,<br>  },<br>});<br><br>requests.interceptors.request.use(<br>  (config) =&gt; {<br>    const token = localStorage.getItem(&quot;token&quot;);<br>    if (token) {<br>      config.headers[&quot;Authorization&quot;] = `Bearer ${token}`;<br>    }<br>    return config;<br>  },<br>  (error) =&gt; {<br>    return Promise.reject(error);<br>  }<br>);<br><br>export default requests;</pre><p><strong>Explanation:</strong></p><ul><li><strong>Axios Instance</strong>: We create an Axios instance with a base URL and default headers.</li><li><strong>Request Interceptor</strong>: Adds an Authorization header if a token exists in local storage, ensuring all requests are authenticated.</li><li><strong>Response Interceptor</strong>: Handles any unauthorized errors by redirecting users to the login page.</li></ul><h4>Implementing Authentication Services</h4><p>Now, create an authentication service that uses the HTTP service to make API calls. This service will handle user login functionality.</p><pre>// auth.service.js<br>import requests from &quot;./http.service&quot;;<br><br>const authService = {<br>  Login(body) {<br>    return requests.post(&quot;/Auth/Login&quot;, body);<br>  },<br>};<br><br>export default authService;</pre><p><strong>Explanation:</strong></p><ul><li><strong>login Function</strong>: Sends a POST request to the /Auth/Login endpoint with the user&#39;s credentials. This function returns a promise that resolves with the response or rejects with an error.</li></ul><h4>Building the Login Page</h4><p>The login page is a critical part of your application’s user authentication flow. Here’s a production-level implementation</p><pre>// Login.jsx<br>import React, { useState } from &quot;react&quot;;<br>import &quot;../Login/login.css&quot;;<br>import { toast } from &quot;react-toastify&quot;;<br>import AuthService from &quot;../../Services/auth.services&quot;;<br>import { useNavigate } from &quot;react-router-dom&quot;;<br>import &quot;react-toastify/dist/ReactToastify.css&quot;;<br><br>const Login = () =&gt; {<br>  const [email, setEmail] = useState(&quot;&quot;);<br>  const [password, setPassword] = useState(&quot;&quot;);<br>  const [error, setError] = useState(&quot;&quot;);<br>  const navigate = useNavigate();<br><br>  const handleLogin = async (e) =&gt; {<br>    e.preventDefault();<br><br>    if (!email || !password) {<br>      toast.error(&quot;Please enter the credentials&quot;);<br>      return;<br>    }<br><br>    const response = await AuthService.Login({ email, password });<br>    const token = response?.data?.data?.token;<br>    localStorage.setItem(&quot;token&quot;, token);<br>    try {<br>      if (response.status === 200) {<br>        toast.success(&quot;Logged in successfully&quot;);<br>        setTimeout(() =&gt; {<br>          navigate(&quot;/&quot;);<br>        }, 3000);<br>      }<br>    } catch (error) {<br>      setError(&quot;Invalid credentials&quot;);<br>      toast.error(&quot;Invalid credentials&quot;);<br>    }<br>  };<br><br>  return (<br>    &lt;div className=&quot;container mt-5&quot;&gt;<br>      &lt;div className=&quot;row d-flex justify-content-center&quot;&gt;<br>        &lt;div className=&quot;col-md-6&quot;&gt;<br>          &lt;div className=&quot;card px-5 py-5&quot; id=&quot;form1&quot;&gt;<br>            &lt;div className=&quot;form-data&quot;&gt;<br>              &lt;div className=&quot;forms-inputs mb-4&quot;&gt;<br>                &lt;span&gt;Email or username&lt;/span&gt;<br>                &lt;input<br>                  type=&quot;email&quot;<br>                  autoComplete=&quot;off&quot;<br>                  className=&quot;form-control is-invalid&quot;<br>                  value={email}<br>                  onChange={(e) =&gt; setEmail(e.target.value)}<br>                /&gt;<br>                &lt;div className=&quot;invalid-feedback&quot;&gt;<br>                  A valid email is required!<br>                &lt;/div&gt;<br>              &lt;/div&gt;<br>              &lt;div className=&quot;forms-inputs mb-4&quot;&gt;<br>                &lt;span&gt;Password&lt;/span&gt;<br>                &lt;input<br>                  type=&quot;password&quot;<br>                  autoComplete=&quot;off&quot;<br>                  value={password}<br>                  className=&quot;form-control is-invalid&quot;<br>                  onChange={(e) =&gt; setPassword(e.target.value)}<br>                /&gt;<br>                &lt;div className=&quot;invalid-feedback&quot;&gt;<br>                  Password must be 8 characters!<br>                &lt;/div&gt;<br>              &lt;/div&gt;<br>              &lt;div className=&quot;mb-3&quot;&gt;<br>                &lt;button className=&quot;btn btn-dark w-100&quot; onClick={handleLogin}&gt;<br>                  Login<br>                &lt;/button&gt;<br>              &lt;/div&gt;<br>            &lt;/div&gt;<br>            &lt;div className=&quot;success-data&quot;&gt;<br>              &lt;div className=&quot;text-center d-flex flex-column&quot;&gt;<br>                &lt;i className=&quot;bx bxs-badge-check&quot;&gt;&lt;/i&gt;<br>              &lt;/div&gt;<br>            &lt;/div&gt;<br>          &lt;/div&gt;<br>        &lt;/div&gt;<br>      &lt;/div&gt;<br>    &lt;/div&gt;<br>  );<br>};<br><br>export default Login;</pre><p><strong>Explanation:</strong></p><ul><li><strong>Form Validation</strong>: Before making an API call, the login form checks if the email and password fields are filled.</li><li><strong>Async API Call</strong>: Uses the AuthService to make an asynchronous API call to log the user in.</li><li><strong>Error Handling</strong>: Displays error messages using react-toastify for better user experience.</li><li><strong>Token Storage</strong>: On successful login, stores the token in localStorage and redirects the user to the home page.</li></ul><h3>Conclusion</h3><p>Integrating an API, especially for authentication, is a fundamental aspect of many web applications. By following these steps and using production-level code, you can ensure your application is both secure and efficient. Remember to handle errors gracefully and always provide feedback to users to enhance the user experience.</p><p><strong>Call to Action:</strong> Try implementing these changes in your application, and don’t hesitate to ask if you have any questions!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e9174f5246a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2024–4577 Critical Vulnerability in PHP]]></title>
            <link>https://medium.com/@mudassirali_79816/cve-2024-4577-critical-vulnerability-in-php-bf98705ec83d?source=rss-24c789dde737------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf98705ec83d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cve-2024]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Mudassir Ali]]></dc:creator>
            <pubDate>Thu, 08 Aug 2024 16:37:22 GMT</pubDate>
            <atom:updated>2024-08-08T16:37:22.747Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*80vsk-5gftRwHo3mzdzwlA.png" /></figure><p>CVE-2024–4577 is a critical vulnerability in PHP for Windows that can lead to the execution of malicious code. This vulnerability, which has a CVSS v3 score of 9.8, can be exploited in all versions of PHP, particularly in Traditional Chinese, Simplified Chinese, and Japanese language configurations. Even default installations using XAMPP are vulnerable. There are several publicly available proof-of-concept (PoC) exploits demonstrating the vulnerability.</p><p>The vulnerability identified as CVE-2024–4577 arises from the CGI engine failing to properly escape the soft hyphen (0xAD). PHP misinterprets this character due to “best fit” mapping, allowing an attacker to add extra arguments to the PHP binary, potentially leading to remote command injection.</p><p>PHP, a widely-used server-side scripting language, is known for its ease of integration with HTML and databases like MySQL, making it a popular choice for developing dynamic web pages and web applications. However, this widespread use also makes it a prime target for attackers.</p><h3>Affected Versions</h3><ul><li>PHP 8.3 before 8.3.8</li><li>PHP 8.2 before 8.2.20</li><li>PHP 8.1 before 8.1.29</li><li>Older, unsupported versions such as PHP 8, PHP 7, and PHP 5</li></ul><h3>Main Features</h3><ul><li><strong>CVE Identifier</strong>: CVE-2024–4577</li><li><strong>Release Date</strong>: 09/06/2024</li><li><strong>Affected Software</strong>: PHP</li><li><strong>CVSS Score</strong>: CVSS:3.1/AV/AC/PR/UI/S/C/I/A(9.8 Critical)</li></ul><h3>Exploitation Requirements</h3><ul><li>PHP must be configured in CGI mode.</li><li>php.exe or php-cgi.exe binaries must be exposed (common in default XAMPP installations).</li><li>The operating system must be Windows.</li></ul><h3>Mitigation of CVE-2024–4577</h3><p>The primary solution is to update PHP to the patched versions:</p><ul><li>PHP 8.3.8</li><li>PHP 8.2.20</li><li>PHP 8.1.29</li></ul><p>A temporary mitigation for installations using Traditional Chinese, Simplified Chinese, and Japanese language configurations can be applied by adding the following rule:</p><pre>RewriteEngine On<br>RewriteCond %{QUERY_STRING} ^%ad [NC]<br>RewriteRule .? - [F,L]</pre><p>For default XAMPP installations on Windows, comment out the following line in the httpd-xampp.conf file:</p><pre># ScriptAlias /php-cgi/ &quot;C:/xampp/php/&quot;</pre><p>Additionally, consider migrating to more secure architectures such as Mod-PHP, FastCGI, or PHP-FPM.</p><h3>Vulnerability Detection</h3><p>The presence of the vulnerability can be identified by checking the PHP version or using scripts and Nuclei templates. It is crucial to apply the patch urgently, as there are active exploits in the wild, including the TellYouThePass ransomware.</p><h3>Proactive Monitoring</h3><p>As part of its emerging vulnerabilities service, Tarlogic proactively monitors clients’ perimeters to detect and urgently notify about the presence of CVE-2024–4577 and other critical threats. This proactive approach is essential to protect assets from potential security breaches.</p><p>By staying informed and taking prompt action, you can mitigate the risks associated with CVE-2024–4577 and ensure the security of your PHP-based applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf98705ec83d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Secure Yourself Online: An OSINT Perspective]]></title>
            <link>https://medium.com/@mudassirali_79816/how-to-secure-yourself-online-an-osint-perspective-7609da2cab93?source=rss-24c789dde737------2</link>
            <guid isPermaLink="false">https://medium.com/p/7609da2cab93</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[osint]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[fingerprinting]]></category>
            <dc:creator><![CDATA[Mudassir Ali]]></dc:creator>
            <pubDate>Sat, 03 Aug 2024 18:42:31 GMT</pubDate>
            <atom:updated>2024-08-03T18:42:31.764Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GT0VnyFH8CKhqaU4mUPf_g.png" /></figure><h4>Understanding Online Tracking and Fingerprinting</h4><p>In the world of cybersecurity, there’s a common belief that OSINT (Open Source Intelligence) operations are completely invisible. This means the target of your investigation should never know you’re looking into them. This is why such investigations are called “passive operations.”</p><p>However, it’s important to remember that nothing is truly private on the Internet. From the moment you use your favorite search engine, your browser starts sharing information with the websites you visit. Each interaction with your browser, whether accessing a site or downloading a file, reveals a bit about you. This data helps websites display correctly on your screen but can also be used to identify you.</p><h4>What is Fingerprinting?</h4><p>Have you ever visited a web store, then seen ads for that store’s products on your social media? This happens because of fingerprinting. Programs track the small traces you leave online and use them to create a profile of your interests. While this can be helpful for recommendations, it can be problematic if you’re trying to stay hidden during an OSINT investigation.</p><p>These traces, or fingerprints, can reveal your identity and activities, putting you at risk. Here are some key elements that contribute to your online fingerprint:</p><h4>IP Addresses</h4><p>Your IP address is like your online address. Every time you use the Internet, your public IP address is sent through your router, allowing websites to communicate with you. While some websites don’t store this information, it can still reveal a lot about you.</p><h4>Cookies</h4><p>Cookies are small files stored on your computer that help websites remember you. They store login information, preferences, and items in your shopping cart. However, third-party persistent cookies, also known as tracking cookies, collect data about your activity and share it with the websites that created them. This helps websites understand your preferences and improve your user experience.</p><p>Some popular websites that use tracking cookies include Doubleclick, Facebook, and Google. To learn more about cookies and how they track you, visit these resources.</p><ul><li><a href="https://www.theguardian.com/technology/2012/apr/23/cookies-and-web-tracking-intro">The Guardian: Cookies and Web Tracking</a></li><li><a href="https://privacy.net/stop-cookies-tracking/">Privacy.net: Stop Cookies Tracking</a></li><li><a href="https://www.cookieyes.com/blog/tracking-cookies/">CookieYes: How Cookies Track You</a></li></ul><h4>Browser Fingerprinting</h4><p>Browser fingerprinting is one of the most intrusive methods of tracking. It uses data from your computer, such as browser version, operating system, screen resolution, and active fonts, to create a unique identifier. This identifier makes it easy to recognize your device, making it nearly impossible to stay anonymous online.</p><p>To see what information your browser reveals, check out these tools:</p><ul><li>Panopticlick</li><li>AmIUnique</li></ul><p>By understanding how online tracking and fingerprinting work, you can take steps to protect your privacy and stay secure online.</p><p>Visit my =&gt; <a href="https://www.linkedin.com/in/mudassir-ali-developer">Linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7609da2cab93" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is bcrypt password encoder?]]></title>
            <link>https://medium.com/@mudassirali_79816/what-is-bcrypt-password-encoder-2dc7fe2131b2?source=rss-24c789dde737------2</link>
            <guid isPermaLink="false">https://medium.com/p/2dc7fe2131b2</guid>
            <category><![CDATA[password-security]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[bcrypt]]></category>
            <dc:creator><![CDATA[Mudassir Ali]]></dc:creator>
            <pubDate>Sat, 22 Jun 2024 07:52:22 GMT</pubDate>
            <atom:updated>2024-06-22T07:52:22.718Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*efjGAQCvU0pivCxLTibdOg.png" /></figure><p>The bcrypt package is commonly used for hashing passwords and verifying them in web applications. It is part of the bcrypt library, which is designed to be a secure, adaptive, and computationally intensive algorithm for password hashing. This makes it harder for attackers to perform brute-force attacks to crack passwords.</p><p><strong>Use Cases of</strong> bcrypt</p><ul><li><strong>Password Hashing</strong></li><li>When a user registers or updates their password, bcrypt is used to hash the password before storing it in the database. This ensures that the actual password is not stored, reducing the risk in case of a database breach.</li><li><strong>Password Verification</strong></li><li>When a user logs in, the application hashes the provided password using bcrypt and compares it with the hashed password stored in the database to verify the user&#39;s identity.</li><li><strong>Salting Passwords</strong></li><li>bcrypt automatically generates a unique salt for each password before hashing. This ensures that even if two users have the same password, their hashed passwords will be different, adding an extra layer of security.</li></ul><h3>Basic Usage of bcrypt in Node.js</h3><p>Here is an example of how to use the bcrypt package for password hashing and verification in a Node.js application:</p><p><strong>Install</strong> bcrypt</p><pre>npm install bcrypt</pre><p><strong>Hashing a Password</strong></p><p>When a user registers, we need to hash their password before storing it in the database</p><pre>const bcrypt = require(&#39;bcrypt&#39;);<br><br>const registerUser = async (password) =&gt; {<br>  const saltRounds = 10; // Higher values mean more security but slower processing<br>  try {<br>    const hashedPassword = await bcrypt.hash(password, saltRounds);<br>    console.log(&#39;Hashed Password:&#39;, hashedPassword);<br>    // Here, you would save the hashedPassword to your database<br>  } catch (error) {<br>    console.error(&#39;Error hashing password:&#39;, error);<br>  }<br>};<br><br>registerUser(&#39;myPlainTextPassword&#39;);</pre><p><strong>Output</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*M991VnGmyXYkN9Na39rjKA.png" /></figure><p><strong>Verifying a Password</strong></p><p>When a user logs in, we need to verify the plain text password against the hashed password stored in the database.</p><pre>const bcrypt = require(&#39;bcrypt&#39;);<br><br>const loginUser = async (plainTextPassword, hashedPassword) =&gt; {<br>  try {<br>    const match = await bcrypt.compare(plainTextPassword, hashedPassword);<br>    if (match) {<br>      console.log(&#39;Password match!&#39;);<br>      // User is authenticated<br>    } else {<br>      console.log(&#39;Password does not match!&#39;);<br>      // Authentication failed<br>    }<br>  } catch (error) {<br>    console.error(&#39;Error verifying password:&#39;, error);<br>  }<br>};<br><br>const storedHashedPassword = &#39;$2b$10$exampleHashedPassword&#39;; // Replace with the actual hashed password from your database<br>loginUser(&#39;myPlainTextPassword&#39;, storedHashedPassword);</pre><p><strong>In this code</strong></p><ul><li>We use bcrypt.compare to compare the plain text password with the hashed password from the database.</li><li>If the passwords match, the user is authenticated; otherwise, the authentication fails.</li></ul><h3>Advantages of Using bcrypt</h3><ul><li><strong>Security</strong></li><li>bcrypt is designed to be computationally intensive and adaptive, meaning it can be configured to slow down over time to counteract faster hardware capabilities of attackers.</li><li><strong>Salting</strong></li><li>Automatically salts passwords, which adds random data to the password before hashing, ensuring unique hashes even for identical passwords.</li><li><strong>Widely Used and Trusted</strong></li><li>bcrypt has been extensively reviewed and tested, making it a trusted choice for password hashing.</li></ul><h3>What is Hashing a Password?</h3><p><strong>Hashing</strong> is the process of transforming a given input (like a password) into a fixed-size string of characters, which appears random. This is done using a hash function. The same input will always produce the same output, but it’s nearly impossible to reverse the process, meaning you can’t take the hashed value and figure out the original password.</p><p><strong>Why Hash Passwords?</strong></p><ul><li><strong>Security:</strong> If an attacker gains access to your database, they won’t see the actual passwords, only the hashed values.</li><li><strong>Uniqueness:</strong> Each password is hashed uniquely, especially when combined with a salt.</li><li><strong>Irreversibility:</strong> Hashing is a one-way function. You cannot derive the original password from the hashed value.</li></ul><h3>Full Example with Express.js</h3><p>Let’s put it all together in a small Express.js application.</p><p><strong>Setup Express and</strong> bcrypt</p><pre>npm install express body-parser</pre><p><strong>Create the Application</strong></p><pre>const express = require(&#39;express&#39;);<br>const bodyParser = require(&#39;body-parser&#39;);<br>const bcrypt = require(&#39;bcrypt&#39;);<br><br>const app = express();<br>app.use(bodyParser.json());<br><br>const users = []; // This will act as our &quot;database&quot; for this example<br><br>app.post(&#39;/register&#39;, async (req, res) =&gt; {<br>  const { username, password } = req.body;<br>  const saltRounds = 10;<br>  try {<br>    const hashedPassword = await bcrypt.hash(password, saltRounds);<br>    users.push({ username, password: hashedPassword });<br>    res.status(201).send(&#39;User registered successfully&#39;);<br>  } catch (error) {<br>    res.status(500).send(&#39;Error registering user&#39;);<br>  }<br>});<br><br>app.post(&#39;/login&#39;, async (req, res) =&gt; {<br>  const { username, password } = req.body;<br>  const user = users.find(user =&gt; user.username === username);<br>  if (!user) {<br>    return res.status(404).send(&#39;User not found&#39;);<br>  }<br><br>  try {<br>    const match = await bcrypt.compare(password, user.password);<br>    if (match) {<br>      res.send(&#39;Login successful&#39;);<br>    } else {<br>      res.status(401).send(&#39;Invalid credentials&#39;);<br>    }<br>  } catch (error) {<br>    res.status(500).send(&#39;Error logging in&#39;);<br>  }<br>});<br><br>app.listen(3000, () =&gt; {<br>  console.log(&#39;Server is running on port 3000&#39;);<br>});</pre><h3>Running the Example</h3><ol><li>Save the code above to a file, e.g., app.js.</li><li><strong>Run the server</strong></li></ol><pre>node app.js</pre><p>Use a tool like Postman or curl to test the endpoints</p><p><strong>Register a user</strong></p><pre>curl -X POST http://localhost:3000/register -H &quot;Content-Type: application/json&quot; -d &#39;{&quot;username&quot;: &quot;user1&quot;, &quot;password&quot;: &quot;password123&quot;}&#39;</pre><p><strong>Login with the user</strong></p><pre>curl -X POST http://localhost:3000/login -H &quot;Content-Type: application/json&quot; -d &#39;{&quot;username&quot;: &quot;user1&quot;, &quot;password&quot;: &quot;password123&quot;}&#39;</pre><p><strong>Follow me for more tutorials and concept:</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2dc7fe2131b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Comprehensive Tutorial On PostgreSQL]]></title>
            <link>https://medium.com/@mudassirali_79816/comprehensive-tutorial-on-postgresql-8a04dd34ad01?source=rss-24c789dde737------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a04dd34ad01</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[postgresql-database]]></category>
            <category><![CDATA[database-management]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Mudassir Ali]]></dc:creator>
            <pubDate>Thu, 06 Jun 2024 05:02:01 GMT</pubDate>
            <atom:updated>2024-06-06T05:02:01.842Z</atom:updated>
            <content:encoded><![CDATA[<p>This tutorial aims to provide a thorough and practical guide for beginners and intermediate users on how to use PostgreSQL, a powerful, open-source object-relational database system. By the end of this tutorial, users should be able to install PostgreSQL, perform basic and advanced database operations, and understand best practices for database management.</p><h3>Introduction to PostgreSQL</h3><h4>What is PostgreSQL?</h4><p>PostgreSQL is a powerful, open-source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads.</p><h4>History and Development</h4><p>PostgreSQL’s development began in 1986 as part of the POSTGRES project at the University of California at Berkeley and has continued actively to the present day.</p><h4>Key Features and Advantages</h4><ul><li><strong>Open Source:</strong> Free to use and modify.</li><li><strong>Standards Compliant:</strong> Adheres to SQL standards.</li><li><strong>Extensible:</strong> Support for custom data types, functions, and operators.</li><li><strong>ACID Compliance:</strong> Ensures reliable transactions.</li><li><strong>Advanced Features:</strong> Includes indexing, full-text search, and JSON support.</li></ul><h4>Use Cases and Applications</h4><ul><li>Web applications</li><li>Data warehousing and analytics</li><li>Geographic information systems (GIS)</li><li>Financial applications</li></ul><h3>Installation and Setup</h3><h4>System Requirements</h4><ul><li><strong>Hardware:</strong> Minimum 1 GB RAM, 1 GHz CPU</li><li><strong>Operating Systems:</strong> Windows, macOS, Linux</li></ul><h4>Downloading and Installing PostgreSQL</h4><ul><li><strong>Windows:</strong> Download the installer from the PostgreSQL website and follow the setup wizard.</li><li><strong>macOS:</strong> Use Homebrew with the command brew install postgresql.</li><li><strong>Linux:</strong> Use package managers like apt for Debian-based systems (sudo apt-get install postgresql) or yum for Red Hat-based systems (sudo yum install postgresql).</li></ul><h4>nitial Configuration and Setup</h4><ul><li>Set up environment variables.</li><li>Initialize the database cluster using initdb.</li><li>Start the PostgreSQL service using pg_ctl or system service managers.</li></ul><h4>Using pgAdmin and Command-line Tools</h4><ul><li><strong>pgAdmin:</strong> A graphical interface for managing PostgreSQL databases.</li><li><strong>psql:</strong> The command-line tool for interacting with PostgreSQL.</li></ul><h3>Basic Database Operations</h3><h4>Creating and Managing Databases</h4><ul><li>Create a database with CREATE DATABASE dbname;.</li><li>List databases with \l in psql.</li></ul><h4>Understanding Data Types</h4><ul><li>Common data types include INTEGER, VARCHAR, TEXT, DATE, BOOLEAN, etc.</li></ul><p><strong><em>Creating Tables and Defining Schemas</em></strong></p><pre>CREATE TABLE users (<br>    user_id SERIAL PRIMARY KEY,<br>    username VARCHAR(50) NOT NULL,<br>    email VARCHAR(100) NOT NULL,<br>    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP<br>);</pre><p><strong><em>Inserting Data</em></strong></p><pre>INSERT INTO users (username, email) VALUES (&#39;Web dev talk&#39;, &#39;web@example.com&#39;);</pre><p><strong><em>Updating Data</em></strong></p><pre>UPDATE users SET email = &#39;john.doe@example.com&#39; WHERE username = &#39;Web dev talk&#39;;</pre><p><strong><em>Deleting Data</em></strong></p><pre>DELETE FROM users WHERE username = &#39;Web dev talk&#39;;</pre><p><strong><em>Querying Data Using SQL</em></strong></p><pre>SELECT * FROM users WHERE email LIKE &#39;%@example.com&#39;;<br>SELECT u.username, o.order_date FROM users u JOIN orders o ON u.user_id = o.user_id;</pre><h3>Advanced Database Operations</h3><h4>Indexes and Performance Tuning</h4><ul><li>Create indexes to speed up queries: CREATE INDEX idx_username ON users (username);.</li></ul><h4>Transactions and Concurrency Control</h4><ul><li>Use transactions to ensure data integrity: BEGIN; UPDATE ... ; COMMIT;.</li></ul><h4>Stored Procedures and Functions</h4><ul><li>Define reusable logic in the database: CREATE FUNCTION calculate_discount(price NUMERIC) RETURNS NUMERIC AS $$ BEGIN RETURN price * 0.9; END; $$ LANGUAGE plpgsql;.</li></ul><h4>Triggers and Rules</h4><ul><li>Automate actions on data changes: CREATE TRIGGER update_timestamp BEFORE UPDATE ON users FOR EACH ROW EXECUTE FUNCTION update_modified_column();.</li></ul><h4>Views and Materialized Views</h4><ul><li>Simplify complex queries: CREATE VIEW user_emails AS SELECT username, email FROM users;.</li></ul><h3>Data Modeling and Design</h3><h4>Entity-Relationship Diagrams (ERDs)</h4><ul><li>Visualize database structure and relationships.</li></ul><h4>Normalization and Denormalization</h4><ul><li>Normalize to reduce redundancy.</li><li>Denormalize for read performance.</li></ul><h4>Designing Efficient Schemas</h4><ul><li>Balance normalization with performance needs.</li></ul><h3>Backup and Recovery</h3><h4>Backup Strategies</h4><ul><li>Regular, automated backups.</li></ul><h4>Using pg_dump and pg_restore</h4><ul><li>Backup: pg_dump dbname &gt; dbname.sql.</li><li>Restore: pg_restore -d dbname dbname.sql.</li></ul><h4>Point-in-Time Recovery</h4><ul><li>Use WAL (Write-Ahead Logging) for precise recovery.</li></ul><h3>Security Best Practices</h3><h4>User Roles and Permissions</h4><ul><li>Use roles to manage permissions: CREATE ROLE readonly;.</li></ul><h4>Authentication Methods</h4><ul><li>Use password, MD5, or other methods for secure authentication.</li></ul><h4>Encryption and Data Protection</h4><ul><li>Encrypt data at rest and in transit.</li></ul><h4>Regular Security Audits</h4><ul><li>Regularly review and update security measures.</li></ul><h3>Performance Tuning and Optimization</h3><h4>Query Optimization Techniques</h4><ul><li>Use indexes, optimize SQL queries.</li></ul><h4>Analyzing and Improving Query Performance with EXPLAIN</h4><ul><li>Use EXPLAIN to analyze query plans.</li></ul><h4>Using Indexes Effectively</h4><ul><li>Understand when and how to use different types of indexes.</li></ul><h4>Monitoring and Diagnosing Performance Issues</h4><ul><li>Use tools like pg_stat_activity and pgBadger.</li></ul><h3>Extending PostgreSQL</h3><h4>Using Extensions</h4><ul><li>Install extensions like PostGIS: CREATE EXTENSION postgis;.</li></ul><h4>Writing Custom Extensions</h4><ul><li>Develop custom functionalities using C or PL/pgSQL.</li></ul><h4>Integrating with Other Tools and Languages</h4><ul><li>Use PostgreSQL with languages like Python (psycopg2) and Java (JDBC).</li></ul><h3>Case Studies and Practical Examples</h3><h4>Real-world Applications of PostgreSQL</h4><ul><li>Examples from various industries.</li></ul><h4>Step-by-step Guides for Common Tasks</h4><ul><li>Practical guides for everyday operations.</li></ul><h4>Troubleshooting Common Issues</h4><ul><li>Solutions for common problems.</li></ul><h3>Resources and Further Learning</h3><h4>Official Documentation</h4><ul><li>Comprehensive guides and references.</li></ul><h4>Community Forums and Support</h4><ul><li>Join the PostgreSQL community for support and networking.</li></ul><h4>Recommended Books and Courses</h4><ul><li>Books like “PostgreSQL: Up and Running” and online courses.</li></ul><h4>Keeping Up with Updates and New Features</h4><ul><li>Follow the official PostgreSQL blog and release notes.</li></ul><h3>Connecting to PostgreSQL using Express.js and Node.js</h3><p>In this practical guide, you’ll learn how to connect a Node.js application to a PostgreSQL database using Express.js. We’ll use the pg library to manage the PostgreSQL connection and perform database operations.</p><h4>Required</h4><ul><li>Basic knowledge of Node.js and Express.js.</li><li>PostgreSQL installed and running.</li><li>Node.js and npm installed.</li></ul><h3>Setting Up Your Project</h3><p><strong>Create a new project directory:</strong></p><pre>mkdir express-postgresql<br>cd express-postgresql</pre><p><strong>Initialize a new Node.js project:</strong></p><pre>npm init -y</pre><p><strong>Install necessary dependencies:</strong></p><pre>npm install express pg</pre><h3>Setting Up PostgreSQL</h3><p><strong>Start PostgreSQL and create a database:</strong></p><pre>psql -U postgres<br>CREATE DATABASE mydatabase;</pre><p><strong>Create a table for testing:</strong></p><pre>\c mydatabase<br>CREATE TABLE users (<br>    id SERIAL PRIMARY KEY,<br>    name VARCHAR(100),<br>    email VARCHAR(100) UNIQUE<br>);</pre><h3>Creating the Express Application</h3><p>Create a new file named app.js and set up a basic Express server:</p><pre>const express = require(&#39;express&#39;);<br>const { Pool } = require(&#39;pg&#39;);<br>const app = express();<br>const port = 3000;<br><br>// Middleware to parse JSON bodies<br>app.use(express.json());<br><br>// PostgreSQL connection setup<br>const pool = new Pool({<br>    user: &#39;postgres&#39;,<br>    host: &#39;localhost&#39;,<br>    database: &#39;mydatabase&#39;,<br>    password: &#39;yourpassword&#39;,<br>    port: 5432,<br>});<br><br>// Test the database connection<br>pool.connect((err) =&gt; {<br>    if (err) {<br>        console.error(&#39;Connection error&#39;, err.stack);<br>    } else {<br>        console.log(&#39;Connected to PostgreSQL&#39;);<br>    }<br>});<br><br>// Routes<br>app.get(&#39;/&#39;, (req, res) =&gt; {<br>    res.send(&#39;Hello World!&#39;);<br>});<br><br>// Start the server<br>app.listen(port, () =&gt; {<br>    console.log(`Server is running on http://localhost:${port}`);<br>});</pre><h3>Creating CRUD Routes</h3><p>Add routes to handle CRUD operations in app.js:</p><pre>// Get all users<br>app.get(&#39;/users&#39;, async (req, res) =&gt; {<br>    try {<br>        const result = await pool.query(&#39;SELECT * FROM users&#39;);<br>        res.status(200).json(result.rows);<br>    } catch (err) {<br>        console.error(err.message);<br>        res.status(500).send(&#39;Server error&#39;);<br>    }<br>});<br><br>// Get a user by ID<br>app.get(&#39;/users/:id&#39;, async (req, res) =&gt; {<br>    const { id } = req.params;<br>    try {<br>        const result = await pool.query(&#39;SELECT * FROM users WHERE id = $1&#39;, [id]);<br>        if (result.rows.length === 0) {<br>            return res.status(404).send(&#39;User not found&#39;);<br>        }<br>        res.status(200).json(result.rows[0]);<br>    } catch (err) {<br>        console.error(err.message);<br>        res.status(500).send(&#39;Server error&#39;);<br>    }<br>});<br><br>// Create a new user<br>app.post(&#39;/users&#39;, async (req, res) =&gt; {<br>    const { name, email } = req.body;<br>    try {<br>        const result = await pool.query(<br>            &#39;INSERT INTO users (name, email) VALUES ($1, $2) RETURNING *&#39;,<br>            [name, email]<br>        );<br>        res.status(201).json(result.rows[0]);<br>    } catch (err) {<br>        console.error(err.message);<br>        res.status(500).send(&#39;Server error&#39;);<br>    }<br>});<br><br>// Update a user by ID<br>app.put(&#39;/users/:id&#39;, async (req, res) =&gt; {<br>    const { id } = req.params;<br>    const { name, email } = req.body;<br>    try {<br>        const result = await pool.query(<br>            &#39;UPDATE users SET name = $1, email = $2 WHERE id = $3 RETURNING *&#39;,<br>            [name, email, id]<br>        );<br>        if (result.rows.length === 0) {<br>            return res.status(404).send(&#39;User not found&#39;);<br>        }<br>        res.status(200).json(result.rows[0]);<br>    } catch (err) {<br>        console.error(err.message);<br>        res.status(500).send(&#39;Server error&#39;);<br>    }<br>});<br><br>// Delete a user by ID<br>app.delete(&#39;/users/:id&#39;, async (req, res) =&gt; {<br>    const { id } = req.params;<br>    try {<br>        const result = await pool.query(&#39;DELETE FROM users WHERE id = $1 RETURNING *&#39;, [id]);<br>        if (result.rows.length === 0) {<br>            return res.status(404).send(&#39;User not found&#39;);<br>        }<br>        res.status(200).send(&#39;User deleted&#39;);<br>    } catch (err) {<br>        console.error(err.message);<br>        res.status(500).send(&#39;Server error&#39;);<br>    }<br>});</pre><h3>Running the Application</h3><p><strong>Start the server:</strong></p><pre>node app.js</pre><p><strong>Test the endpoints:</strong></p><ul><li>Use tools like Postman or curl to test the CRUD operations.</li><li><strong>Get all users:</strong></li></ul><pre>curl http://localhost:3000/users</pre><p><strong>Get a user by ID:</strong></p><pre>curl http://localhost:3000/users/1</pre><p><strong>Create a new user:</strong></p><pre>curl -X POST -H &quot;Content-Type: application/json&quot; -d &#39;{&quot;name&quot;:&quot;Web dev talk&quot;,&quot;email&quot;:&quot;john@example.com&quot;}&#39; http://localhost:3000/users</pre><p><strong>Update a user:</strong></p><pre>curl -X PUT -H &quot;Content-Type: application/json&quot; -d &#39;{&quot;name&quot;:&quot;Web dev talk&quot;,&quot;email&quot;:&quot;jane@example.com&quot;}&#39; http://localhost:3000/users/1</pre><p><strong>Delete a user:</strong></p><pre>curl -X DELETE http://localhost:3000/users/1</pre><p>You’ve now set up a basic Express.js application that connects to a PostgreSQL database and performs CRUD operations. This setup can serve as a foundation for more complex applications, and you can expand it by adding features such as authentication, advanced querying, and error handling. For more information you can visit <a href="https://www.postgresql.org/docs/">https://www.postgresql.org/docs/</a><br>Express js <a href="https://expressjs.com/">https://expressjs.com/</a></p><p>Node js <a href="https://nodejs.org/docs/latest/api/">https://nodejs.org/docs/latest/api/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a04dd34ad01" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>