Create a Custom URL Shortener using Node.JS and MongoDB

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • ► Master NodeJS Playlist: • Master NodeJS
    ► Download Source Code: www.piyushgarg...
    Learn how to build your own URL shortener service using Node.js, Express, and MongoDB. In this video tutorial, we'll show you step-by-step how to set up the server, connect to a MongoDB database, and implement the functionality to shorten and redirect URLs. Perfect for beginners and experienced developers alike!
    ► Complete Full Stack Web Developer RoadMap 2023: • Complete Full Stack We...
    Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to run JavaScript on the server side, creating server-side applications with JavaScript.
    ► My Website: www.piyushgarg...
    My Gears
    ► My Girlfriend: amzn.to/3WD6FRp
    ► Apple MacBook Laptop: amzn.to/3WBJgQn
    ► Anker USB Hub: amzn.to/3GhZSr0
    ► Blue Yeti Microphone: amzn.to/3YKZ9FT
    ► External 27” Monitor: amzn.to/3Vp3xaO
    ► Logitech MK295 Wireless Keyboard and Mouse: amzn.to/3DuL1bB
    ► Seagate Expansion 1TB External HDD: amzn.to/3QMm5Q8
    ► Tripod: amzn.to/3S4OwK4
    ► Ring Light: amzn.to/3YLf8DR
    Disclaimer: All the links above are affiliate links.
    Social Links
    ► Twitter - / piyushgarg_dev
    ► LinkedIn - / piyushgarg195
    Video Titles
    Create Your Own URL Shortener Service with Node.js, Express, and MongoDB
    Make a URL Shortener App in Node.js and Express - Beginner's Guide
    Making a URL Shortening Application using Node.js, Express and MongoDB
    Tags
    #nodejs #javascript #expressjs #mongodb #mernstack #developer #api #https #server #javascriptinhindi #webdevelopment #webapp #realtimeapp #serverside #nonblockingio #tech

КОМЕНТАРІ • 264

  • @recap9117
    @recap9117 9 місяців тому +45

    Node ka real feel iss bnde me Diya h, hats off man❤

  • @saranyasingh6847
    @saranyasingh6847 Рік тому +26

    I was getting error with both nanoid and shortid , so I used nanoid@^3.0.0

    • @abc-ym4zs
      @abc-ym4zs 11 місяців тому

      I am not understanding these fucking topics 😅 what to do bro I am not liking can u suggest what u are doing now

    • @RohtashSingh-o8t
      @RohtashSingh-o8t 10 місяців тому

      Is it working ?

    • @bunnytheweebster
      @bunnytheweebster 9 місяців тому

      thanks bud

    • @adityabisoyi1502
      @adityabisoyi1502 8 місяців тому +4

      ShortId and nano Id are not working for me. I used another library caller short-unique-id

    • @abc-ym4zs
      @abc-ym4zs 8 місяців тому

      @@adityabisoyi1502 die with errors and dsa systemdesign and webdev

  • @abhinavexperimental
    @abhinavexperimental Місяць тому +1

    12:50 nanoid is throwing some error, which can be fixed by dunamically importing it -
    async function generateNewShortURL(req, res) {
    const body = req.body;
    if (!body.url) {
    return res.status(400).json({
    error: "URL is required."
    });
    }
    const { nanoid } = await import('nanoid');
    const shortID = nanoid(8); // Generate the short ID
    await URL.create({
    shortId: shortID,
    redirectURL: body.url,
    visitHistory: [],
    });
    return res.json({ id: shortID });
    };

  • @hrithikjoshi4587
    @hrithikjoshi4587 5 місяців тому +2

    Why is all the talk about a short id library and adding extra dependency for a small work. Use below function
    function generateRandomString() {
    const length = 8;
    const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
    let result = '';
    for (let i = 0; i < length; i++) {
    result += chars.charAt(Math.floor(Math.random() * chars.length));
    }
    return result;
    }

    • @javabrain8480
      @javabrain8480 5 місяців тому

      i copied and pasted your code but still getting error. What should i enter in the argument shortID inside await function?

    • @hrithikjoshi4587
      @hrithikjoshi4587 5 місяців тому

      @@javabrain8480 your id will be the result of above function, execute above function and store it in a variable

    • @User-yb3yc
      @User-yb3yc 3 місяці тому +2

      Nice bro it worked 🎉

  • @SimpleProgrammer0
    @SimpleProgrammer0 8 місяців тому +4

    13:08 their was an error with nanoId : you can install this specific version of nanoId to remove this error : npm install nanoid@2.1.11
    thanks me later😀

  • @mandeepsingh2718
    @mandeepsingh2718 7 місяців тому +2

    Halat patli ho gyi Bhai yeh project banate banate ...
    Kahin khudse banana pad Jaye Bina dekhe fir pata nhi kya ho....
    It seems quite difficult right now😮

    • @gamerschoice779
      @gamerschoice779 5 місяців тому +1

      Same here.. is playlist ki Kitne videos dekh lie aapne abhi tak?

  • @Crazy_philosopher
    @Crazy_philosopher 4 місяці тому +7

    Bhai kya Banda haii master haii computer field ka nodejs pe kya command hai iski , wahhhh isee to Google, microsoft aasani se job mil sakti haii ...
    Great bro keep going ❤💯🔥

  • @aesthetic_universe
    @aesthetic_universe 3 місяці тому +5

    if getting this error ->
    res.redirect(entry.redirectedURL);
    ^
    TypeError: Cannot read properties of null (reading 'redirectedURL')
    at D:
    ode js\URL-Shortner\index.js:27:22
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    Node.js v18.16.0
    [nodemon] app crashed - waiting for file changes before starting...
    solution -
    res.redirect('' + entry.redirectURL);

    • @codepythonYT
      @codepythonYT 3 місяці тому

      Thanks man

    • @devascript
      @devascript 2 місяці тому

      thanks buddy , i have full of respect for you my man , i have wasted 3 hrs to solve that fucking bug

    • @aesthetic_universe
      @aesthetic_universe 2 місяці тому

      @@devascript I too man, that’s why I posted this comment so that people watching in future won’t have to waste time on this!!

    • @ayushsingh8859
      @ayushsingh8859 25 днів тому

      thanks man this bug was way difficult to find I just wasted quite some time on this 😡

  • @saptarshisinha1744
    @saptarshisinha1744 6 місяців тому +3

    Project completed ✅
    Maja agya error handle karne mein ❤

  • @bunnytheweebster
    @bunnytheweebster 9 місяців тому +4

    thoda complex laga sab ek sath, but it was unbelievable 23 mins k video me itna sab kuch.. Vid - 21✅

  • @shivanshusingh7660
    @shivanshusingh7660 11 місяців тому +4

    bhai I follow your same code and when i start npm the npm is running also but when i run send url from post man it always saying url is required please helpm me out

  • @heydude1551
    @heydude1551 2 місяці тому +1

    Now my only goal is to be perfectionist like him while my hands on keyboard. ....how much does it take to be pro in backend?

  • @madmax180
    @madmax180 8 місяців тому +2

    it was not working because nano id supports common js syntax only upto version 3 and we are using version 5
    solution : 1) use module syntax instead
    2) degrade to version 3

  • @PNikhil-w2b
    @PNikhil-w2b 6 місяців тому +1

    if(!body.url){ return res.json({error:"URL Needed"}) }
    ^
    TypeError: Cannot read properties of undefined (reading 'url')
    Any one ??

    • @Sneha-d1d
      @Sneha-d1d 5 місяців тому +1

      Included app.use(express.json()) middleware in the index.js?

    • @AjayKumar-bj4hk
      @AjayKumar-bj4hk 3 місяці тому

      and make sure that you add on the top of url roure

  • @kaustubhjoshi9022
    @kaustubhjoshi9022 9 місяців тому +12

    if getting this error ->
    res.redirect(entry.redirectedURL);
    ^
    TypeError: Cannot read properties of null (reading 'redirectedURL')
    at D:
    ode js\URL-Shortner\index.js:27:22
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    Node.js v18.16.0
    [nodemon] app crashed - waiting for file changes before starting...
    solution -
    res.redirect('' + entry.redirectURL);

    • @snehamaurya3659
      @snehamaurya3659 8 місяців тому +1

      thankss can u tell me how you got this solution?

    • @KirtanPatel552
      @KirtanPatel552 8 місяців тому

      Same Here If You Have Any Solution Than tell me ...

    • @pranjalmaurya3832
      @pranjalmaurya3832 7 місяців тому

      Did u got the solution?

    • @mkmihirkalbende2622
      @mkmihirkalbende2622 6 місяців тому

      Thank You Brother!!

    • @devascript
      @devascript 2 місяці тому

      yeah i also got this error can , solution mila ki nahi bhai

  • @dpxy1599
    @dpxy1599 6 місяців тому +1

    ban gaya

  • @PrabhunarayanSingh-t7o
    @PrabhunarayanSingh-t7o Місяць тому +1

    brother you are teach people or self study your tutorial is very fast.

  • @TWNOGaming
    @TWNOGaming 2 місяці тому

    bekar ya banata hai wo banta hai but kyu banate hai ya reson kun sikyaga. Dislike

  • @lovelymusic3549
    @lovelymusic3549 Рік тому +3

    Sir will you upload react native course please tell me?

  • @ChitraAtlani-n5q
    @ChitraAtlani-n5q 3 місяці тому +1

    shortid has been reprecated, any other package recommended?

  • @sachinandanprasad7618
    @sachinandanprasad7618 11 місяців тому +1

    Help Please,
    Cannot GET /analytics/0AOgMEv

  • @tutedroid171
    @tutedroid171 13 днів тому

    please keep up the classes free on youtube. They are so helpful.

  • @devilslord1864
    @devilslord1864 2 місяці тому

    I made my own nanoid 😅 cauz its not working......

  • @Sameer-codes
    @Sameer-codes Рік тому +2

    await is not working for res.redirect
    can you please help

    • @anandshete9170
      @anandshete9170 8 місяців тому

      use async function then you will be able to use await

  • @roshannayak5982
    @roshannayak5982 Рік тому +2

    getting error on postman get request "Cannot GET /url/8iN0AH5hG" also used yr source code but still getting issue how to fix can u help ?

    • @MessiLeo2312
      @MessiLeo2312 10 місяців тому

      router.get("/analytics/:shortId",handleAnyalytics) try this path

    • @decodewithd2541
      @decodewithd2541 5 місяців тому

      same issue , have you found the solution???

  • @fearlesstaurus1585
    @fearlesstaurus1585 3 місяці тому +1

    i tried using nanoid and shortid for once post request works but when i try to make second its giving duplicate error, it's not generating unique shortID and get request for /:shortID also does not work

    • @MohammedHusainmobikira
      @MohammedHusainmobikira Місяць тому

      const URL = require("../models/url");
      async function handleGenerateNewShortURL(req, res) {
      const { nanoid } = await import("nanoid");
      const body = req.body;
      if (!body.url) return res.status(400).json({ error: "url is required!" });
      const shortID = nanoid(8);
      await URL.create({
      shortId: shortID,
      redirectUrl: body.url,
      visitHistory: [],
      });
      return res.json({ id: shortID });
      }
      module.exports = { handleGenerateNewShortURL };

  • @sidanshu012
    @sidanshu012 Місяць тому

    Import, export 😢😢 game, Bounce chla gya

  • @motivationalshorts393
    @motivationalshorts393 13 днів тому

    again url post krne pr duplicate key bar bar aa rha hai
    anyone help?

  • @vishalshrivastava4618
    @vishalshrivastava4618 2 місяці тому

    Hi Piyush, I am Vishal doing Practice with the help of this video. I got stuck whiten an error which I am pasting below. could you please help me out to fixed it. Thanks!
    C:\Users\Taruna\OneDrive\Desktop\SHORT-URL
    ode_modules\mongoose\lib\document.js:3306
    this.$__.validationError = new ValidationError(this);
    ^
    ValidationError: url validation failed: shortId: Path `shortId` is required.

    • @devascript
      @devascript 2 місяці тому

      so na tumne Schema ke under shortid ko required true kiya hoga na that's right uske wajah se kuch lag rha hai

  • @codewithhindi
    @codewithhindi Рік тому +3

    Osem content Hindi language fabulous teaching method thanks sir

    • @piyushgargdev
      @piyushgargdev  Рік тому +1

      Thanks and welcome

    • @codewithhindi
      @codewithhindi Рік тому +1

      @@piyushgargdev hello sir Abhi Tak youtube pe mern series nahi hai good content with project aap apne chenal pe layiye hindi me

  • @AtharvJoshi-jc7ow
    @AtharvJoshi-jc7ow 3 місяці тому +1

    I understood the code, but I didn't understand the purpose of this app
    I mean why do we need short url anyways?

    • @devascript
      @devascript 2 місяці тому

      kahi kahi pe bahut badi url hoti hai that's why, and hui baat linkedin ki to linkedin pe limit hai url ki to ye waha pe bhi kaam aa sakta hai

  • @BestURLShortenerBioPageQRCode
    @BestURLShortenerBioPageQRCode Рік тому +8

    Thank you for your great efforts! Really really awesome video.

  • @mma-dost
    @mma-dost Рік тому +3

    great video bhaiya what will be the next video?

  • @HarishTripathi-h2b
    @HarishTripathi-h2b 8 місяців тому +1

    sir postman not connect error 404 but code is same please provde same code

  • @motivationalshorts393
    @motivationalshorts393 13 днів тому

    can anyone provide source code ??

  • @oshiagrawal2030
    @oshiagrawal2030 27 днів тому

    I am geeting while redirecting , it says cannot read properties of null

    • @shiv.am_yadav0174
      @shiv.am_yadav0174 13 днів тому

      Handle entry ! -> use this code
      If(!entry) return res.status(404).json({ message: "short URL not found"});
      Iss code ko redirect ke upd paste krdo ❤

  • @rabinsaha3218
    @rabinsaha3218 20 днів тому

    Source code address broken

  • @varunjagtap2923
    @varunjagtap2923 2 місяці тому

    write EPROTO 37039240:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:..\..\..\..\src\third_party\boringssl\src\ssl\tls_record.cc:242:
    plz help me out with this

  • @sankalpnaik877
    @sankalpnaik877 9 місяців тому +1

    I am not getting the desired output for the last part ...for number of clicks....the postman is showing cannot get ......please help!!

    • @animeshbiswas2754
      @animeshbiswas2754 9 місяців тому +1

      What error are you facing?

    • @AdityaSingh-yz9g
      @AdityaSingh-yz9g 9 місяців тому

      I am also facing the same

    • @sankalpnaik877
      @sankalpnaik877 9 місяців тому

      @@AdityaSingh-yz9g it works fine in website

    • @AdityaSingh-yz9g
      @AdityaSingh-yz9g 9 місяців тому

      not with me I am not getting the website when I get request from postman

  • @abhishekgaikwad3977
    @abhishekgaikwad3977 9 місяців тому +1

    when i add 1st new entry it add without error but when i add 2nd url it show error
    mongoServerError: E11000 duplicate key error collection: urlShortner.urls index: shortID_1 dup key: { shortID: null }

    • @tanishkgupta6149
      @tanishkgupta6149 8 місяців тому

      facing same problem bro is you got any solution please share kar dena

    • @UzairKhan-qd3xu
      @UzairKhan-qd3xu 8 місяців тому

      it seems to be a problem where you are overwriting, are you sure you are creating new field instead of updating?

    • @SUBZERO-vx7xs
      @SUBZERO-vx7xs 6 місяців тому

      same error , did you resolve it ?

    • @solaimfaisal
      @solaimfaisal 4 місяці тому

      same error did you resolve

    • @solaimfaisal
      @solaimfaisal 4 місяці тому

      @@SUBZERO-vx7xs yeah i had to drop the database

  • @prasiddhbarot9323
    @prasiddhbarot9323 Рік тому +1

    18:02 bhai ye entry par hover karne suggestions kaise aaya?
    Koi extension ho to batao!!

  • @PulkitMalhotra
    @PulkitMalhotra 2 місяці тому +1

    Few questions:
    1. 06:08 Why you used express.Router() instead of express()
    2. 12:26 How does this script start working and what is nodemon
    3. 11:58 What did you do here, what is this localhost port, and how are you saving the data.

    • @toomuchharsh
      @toomuchharsh Місяць тому +2

      Bro Just watch the tutorial from starting lec-1

    • @SNX03
      @SNX03 Місяць тому

      bruh you don't even know the basics, I recommend watching from the start dude.

    • @ashishkumar-jo7cj
      @ashishkumar-jo7cj Місяць тому

      Yes bro watched the node js tutorial from starting these all the basics which you are asking here

  • @HussnainMulazam
    @HussnainMulazam 21 день тому

    sir ak line code ni run ho raha

  • @DhirajKumar-zr1xp
    @DhirajKumar-zr1xp Місяць тому

    if getting this error ->
    res.redirect(entry.redirectedURL);
    ^
    TypeError: Cannot read properties of null (reading 'redirectedURL')
    at D:
    ode js\URL-Shortner\index.js:27:22
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    Node.js v18.16.0
    [nodemon] app crashed - waiting for file changes before starting.
    Try this SOLUTION:-
    res.redirect(`${entry.redirectURL}`);

    • @knightcore4062
      @knightcore4062 Місяць тому

      exactly bhai, bug fix hua...?

    • @knightcore4062
      @knightcore4062 Місяць тому

      Bug Fix - @abhavgoel9390 🙏🙏
      let redirectUrl = entry.redirectURL;
      if (!redirectUrl.startsWith('') && !redirectUrl.startsWith('')) {
      redirectUrl = '' + redirectUrl;
      }
      console.log("Redirecting to " + redirectUrl);
      return res.status(302).redirect(redirectUrl);

    • @DhirajKumar-zr1xp
      @DhirajKumar-zr1xp Місяць тому

      @@knightcore4062 ha

  • @srajangarg21
    @srajangarg21 2 місяці тому

    SyntaxError: Unexpected end of JSON input
    at JSON.parse () ye error ara hai mera

  • @AbhiGamingYT0234
    @AbhiGamingYT0234 3 місяці тому

    EROER: npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program.
    the above error is being thrown by teminal when i am trying to execute the npm start command, pls reply ASAP sir its urgent for me!

  • @DesertCentipede
    @DesertCentipede 3 місяці тому

    console.log("tut was grea, but file naming confused me a lot");

  • @creativitychannel39
    @creativitychannel39 2 місяці тому

    shortid is worked

  • @SUHRIDBEHARIPAUL
    @SUHRIDBEHARIPAUL Місяць тому

    where is the ui?

  • @AjayKumar-bj4hk
    @AjayKumar-bj4hk 3 місяці тому

    ValidationError: url validation failed: redirecturl: Path `redirecturl` is required.

  • @prasadmutnale773
    @prasadmutnale773 10 місяців тому +1

    i like the way you explain and also i learning how to read docs

  • @Vivek-rn9zb
    @Vivek-rn9zb Рік тому +1

    Bhaiya bahut error aa raha hai kuch samajh nahi aa raha hai ki kya kare jabki code same to same likh rahe hai

    • @mandeepsingh2718
      @mandeepsingh2718 7 місяців тому

      Bhai Sikh rhe ho node js ?
      Ja chod dia ..
      Bcoz Maine abhi start Kia hai koi tips le lu

  • @shubhamchauhan6633
    @shubhamchauhan6633 Рік тому +1

    thanks for the tutorial. I am getting an error. while using findOneAndUpdate It returns null because of which redirect is not working. I tried your code also but it is not working

    • @iamksb
      @iamksb Рік тому

      I am also getting the same error

    • @comparisondata2473
      @comparisondata2473 Рік тому

      check if u have exported and imported database properly

    • @nityaranjan6714
      @nityaranjan6714 Рік тому

      @@comparisondata2473 yes imported correctly.

    • @priyajha3700
      @priyajha3700 9 місяців тому

      it is the problem of res.redirect , it needs a protocol like http or https otherwise it consider the redirect as a relative path - this will throw out an error
      Use this instead
      const url=entry.redirectURL.startsWith('') || entry.redirectURL.startsWith('') ? entry.redirectURL :`${entry.redirectURL}` ;
      res.redirect(url)

  • @vishalsaini1180
    @vishalsaini1180 6 місяців тому

    facing that error what should i do
    res.redirect( redirectURL);
    ^
    ReferenceError: redirectURL is not defined
    at D:\Web devlopment\Projects\URL_SHORTNER\index.js:32:20
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

  • @ayushshrey9916
    @ayushshrey9916 Рік тому +5

    I am getting this error when I use generated shortid url in search bar:
    res.redirect(entry.redirectURL);
    ^
    TypeError: Cannot read properties of null (reading 'redirectURL')

    • @aniket5657
      @aniket5657 Рік тому

      This might solve the issue: (entry?.redirectURl)

    • @niteshkushwaha9493
      @niteshkushwaha9493 Рік тому

      Your two routes are clashing.

    • @cws20128
      @cws20128 10 місяців тому

      @@niteshkushwaha9493 then how to solve this ?

    • @UzairKhan-qd3xu
      @UzairKhan-qd3xu 8 місяців тому

      could be an unresolved promise, are you sure you are using async await or .then right?

    • @KirtanPatel552
      @KirtanPatel552 8 місяців тому

      So For This I will Give Solution which is
      const entry = await Url.findOneAndUpdate({
      shortId,
      }, {
      $push: {
      visitHistory: {
      timestamp: Date.now(),
      }
      }
      });
      res.redirect(entry.redirectURL);
      })
      Error is if you are Give if there are nothing return by entry Because Your name "shortId" is same in Your Schema "shortId " so Your Code will Succesfully Worked

  • @SonuKumar-e4o6k
    @SonuKumar-e4o6k 10 місяців тому +1

    You make really fantastic videos. I like the way of your teaching and writing the code in efficient manner. wow It's really outstanding...

  • @VermaCoder
    @VermaCoder 4 місяці тому +1

    bro no doubt.. you have knowledge in this... but you teach so fast.. any beginner who wants to learn from your series can't catch easily.... disappointed by this.

  • @Vivek-rn9zb
    @Vivek-rn9zb Рік тому +2

    Bhaiya yah project jaldi complete kar dijiyega please bhaiya

  • @satyampal7235
    @satyampal7235 7 місяців тому +1

    Bhai maza aagya. awesome approach 🥳

  • @DreamsCareerIndia
    @DreamsCareerIndia 4 місяці тому

    so fast

  • @AbhinavSingh-bp5qh
    @AbhinavSingh-bp5qh Рік тому +2

    love your playlist

  • @amanbhatt1087
    @amanbhatt1087 8 місяців тому

    bhai agar null wali error aa rhi hain toh upr bhai n source code diya hain usko copy marke console m entry print karana error dikh jayegiii tumkoo tumhari..
    thanks me later.. bye

  • @geeky_world
    @geeky_world 8 місяців тому

    pls give some basic knowledge on mongodb also ...i feel its going fast in between

  • @BhanishiSharma
    @BhanishiSharma Рік тому

    I am getting confused because mongodb is not running properly in my project

  • @nikitabhardwaj1876
    @nikitabhardwaj1876 3 місяці тому

    everytime i run this it shows this
    [nodemon] app crashed - waiting for file changes before starting...

    • @sauravmishra2732
      @sauravmishra2732 3 місяці тому

      i am also getting same as URL.create is not a function

  • @The_Builder_Bobs
    @The_Builder_Bobs 6 місяців тому

    where did you declare urlRoute before importing

  • @peatear9421
    @peatear9421 4 місяці тому

    bhaiya I'm getting Error: read ECONNRESET on postman even after using express.json() middleware , with the same error msg in the console which you got , help me fix it?

    • @AmitMusic-02
      @AmitMusic-02 3 місяці тому

      has the error been resolved? i am stuck too.

  • @Hrishabhhhh
    @Hrishabhhhh 4 місяці тому

    Hey can anyone help me... I'm getting a... TypeError: Cannot read properties of undefined (reading 'push')

  • @himanshutiwari3442
    @himanshutiwari3442 4 місяці тому

    on npmjs the shortid you have used is unavailable and now I'm using short unique id but this showing error so pls resolve this and what can i do.........pls check it sir

  • @Aitool-r3q
    @Aitool-r3q 8 місяців тому +1

    URL Shortner created Done✅ thanks sir jee

    • @kishankg7056
      @kishankg7056 3 місяці тому

      have you completed url shortner ..?is shortid package was working..?

  • @pranavsingh2238
    @pranavsingh2238 Рік тому +1

    Hi there, I am a little bit confused, won't this URL shortner only work on the machine in which npm is running

    • @chetanram797
      @chetanram797 Рік тому

      Deployment ke bad sab machine pe work krega.

  • @NaginSulka
    @NaginSulka 2 місяці тому

    what is small letters url in schema here?

  • @bhaisaheb4686
    @bhaisaheb4686 5 місяців тому

    anyone following along, I'm getting entry as null and so redirect is not working, pls help

    • @bhaisaheb4686
      @bhaisaheb4686 5 місяців тому

      though every time I'm hitting get method visitHistory is updating

  • @technicalabhi7683
    @technicalabhi7683 Рік тому +1

    Make video on get ip address

  • @SaurabhKumar-qc6og
    @SaurabhKumar-qc6og 9 місяців тому

    Bhaiya can you please make a video on tracking the IP of the client in the analytics. As I was reading about this feature, this seams to be tricky in the case of proxy or load balancers.

  • @awanishmishra4611
    @awanishmishra4611 4 місяці тому

    How to deploy this on server ?

  • @vageshnp6792
    @vageshnp6792 7 місяців тому

    I am getting error that database not connected

  • @Vivek-rn9zb
    @Vivek-rn9zb Рік тому +1

    Nice video bhaiya

  • @VishaljangidJngid
    @VishaljangidJngid 8 місяців тому

    Bhai kisi ko is theme ka name pata ho to batao yrrrr

  • @creativitychannel39
    @creativitychannel39 2 місяці тому

    I like the way you explain

  • @moviesasylum8531
    @moviesasylum8531 5 місяців тому

    how to connect it to online mongoDB

  • @shubhamgupta-bl1tr
    @shubhamgupta-bl1tr Рік тому +1

    Nice

  • @decodewithd2541
    @decodewithd2541 5 місяців тому

    I am getting error while sending the GET request , help me

    • @velanthevar2459
      @velanthevar2459 5 місяців тому

      In the router folder post request is made so you should send the post request

  • @VikasSharma-kc2oc
    @VikasSharma-kc2oc Рік тому +1

    🔥🔥

  • @RohitKumar-dy2gc
    @RohitKumar-dy2gc 7 місяців тому

    amazing and simple project for beginners like me✨✨

  • @satyamjha-codeindwala6666
    @satyamjha-codeindwala6666 7 місяців тому

    Node.JS and MongoDB

  • @shaktilab
    @shaktilab Рік тому

    how handlegenerateshorturl function get req and res objects?

  • @RahulKumar-ed9vw
    @RahulKumar-ed9vw Місяць тому

    best series ever

  • @dev_opsenginner4383
    @dev_opsenginner4383 Рік тому

    make a video on mongodb module in Nodejs

  • @Sandy-ip2mm
    @Sandy-ip2mm 5 місяців тому

    thanks bro for the great video

  • @RayanAhmad-m6d
    @RayanAhmad-m6d 11 місяців тому

    Interesting video, nice explanation Thanks

  • @harshpandey7970
    @harshpandey7970 3 місяці тому

    Fantastic course. Node js ka feel aa gaya

    • @kishankg7056
      @kishankg7056 3 місяці тому

      bhai tune, short url project banye hai..?

  • @shashankchaudhary3625
    @shashankchaudhary3625 Рік тому

    i got this error ..ValidationError: url validation failed: shortID: Path `shortID` is required.

    • @deepeshkhatri5370
      @deepeshkhatri5370 9 місяців тому

      me too
      ,any solutions

    • @aliasgeranees8893
      @aliasgeranees8893 4 місяці тому

      @@deepeshkhatri5370 Hi short id and nano id both are not working so pleaes dont use them instead use this code:-
      function generateRandomString(n) {
      const str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
      let randomString = "";
      for(let i = 0 ; i < n ; i++) {
      const random = Math.floor(Math.random()*str.length);
      randomString += str[random];
      }
      return randomString;
      }
      module.exports = generateRandomString;
      I think you guys might have already gotten the solution since its 10 months
      😅

  • @yashigupta2212
    @yashigupta2212 Рік тому

    Code is not working

  • @apoorvaraj3894
    @apoorvaraj3894 5 місяців тому

    Excellent explanation❤

  • @nityaranjan6714
    @nityaranjan6714 Рік тому

    TypeError: Cannot read properties of null (reading 'redirectURL') , Anyone please help how to resolve it.

    • @satyamraj2779
      @satyamraj2779 11 місяців тому

      Exactly, I m also getting the same error..

    • @cws20128
      @cws20128 10 місяців тому

      @@satyamraj2779 Yep same error

    • @pragatiailani7206
      @pragatiailani7206 10 місяців тому

      try res.redirect('' + entry.redirectURL);

    • @ankurshukla7889
      @ankurshukla7889 9 місяців тому +1

      add while passing the URL. Hope it helps

  • @69pinkman50
    @69pinkman50 6 місяців тому

    Congrats For 100k MAn

  • @warrior_pk
    @warrior_pk Рік тому

    14:18 terminal clear krke prompt top pr kaise kiya ? koi shortcut key hai qa

  • @adityaS011
    @adityaS011 Рік тому

    Where is the second video

  • @charanmane4178
    @charanmane4178 4 місяці тому

    8:48