very good job you did, you helped me a lot to complete some of the challenges, you should upload more videos like this to help me to complete the challenges.
Hi Landon!!!...thank you so much for all your support!!!...time ago I am following your videos because I am resolving the freeCodecamp challenges...at the minute 1:24 from video I can t find option urlshortner wich is located under option sessions advanced...could you help me?...thank you..
I followed your code....it is showing error page : Hmm... We couldn't reach this Repl Make sure this Repl has a port open and is ready to receive HTTP traffic. Please help me to resolve this error.
8:58 why the need to parse the url when the dns.lookup function accepts string already? Why not just dns.lookup(req.body.url, (req, res) => ...). Also the challenge didnt mention anything about using mongodb?
I mean the challenge didnt state that you have to use any kind of database, I just stored it in a object on the script itself like so: const table = { url: " ", short_url: 0 } and then I just redirect whenever and the challenge still passes like wth? app.get('/api/shorturl/:shorturlId', (req,res)=>{ // retrieve from table, redirect res.redirect(table.url) }) (dont even need to use the param) How would one even know that you needed to use a database to pass this challenge am I suppose to infer? It's not even written @@landonschlangen
Always rushing, not considering slow learners like me. I would love to feed on your videos, but I always find it hard to understand, you don't pause to give a brief explanation. Good work though. Thanks
Day 2 now and I still can't get it to work completely. It works as expected when i enter an invalid URL, displays the error message but when I enter a correct URL I keep getting the error: "const urlCount = await urls.countDocuments({}); ^ TypeError: urls.countDocuments is not a function at GetAddrInfoReqWrap.callback" I've tried googling and tried different things but nothing has worked yet. Any advice/suggestion would really help. Thanks in advance
@@muhammadmuneeb3739Make sure your DB and collection name on MongoDB matches what you declare in your code: const db = client.db("shortenedURL"); const urls = db.collection("urls");