Make a register/login page in node js using MYSQL

Поделиться
HTML-код
  • Опубликовано: 21 янв 2025

Комментарии • 197

  • @reikishinami174
    @reikishinami174 2 года назад

    PLEASE HELP
    at around 54:10 there's an error on the console for me:
    POST localhost:3000/api/register 404 (Not Found)
    the request payload on the Network did ate the values but the response one only returned a 404
    The same error also applies on ur alternative code dat u gave on ur description
    Am I missing something? Please help cuz I'm losing hairs trying to figure out the bug

    • @Elderny
      @Elderny  2 года назад

      Kindly upload your code to GitHub and send me link on telegram @elderny1

    • @reikishinami174
      @reikishinami174 2 года назад

      @@Elderny it's all gud now! the issue was I somehow doubled the router's .use on my main app.js and misplaced it lol thanks anyway~

  • @CastleShield
    @CastleShield 2 года назад +1

    That was very useful for me, thanks. :)

  • @radzs9939
    @radzs9939 Год назад +1

    Error: ENOENT: no such file or directory, stat 'C:\Users
    a\Desktop\sql_user_page\public
    egister.html'
    - I keep on getting this error, anytime I try to click on either the register page or the Login Page

    • @Elderny
      @Elderny  Год назад

      Check if the file is there or not

  • @philipp.snr05
    @philipp.snr05 Год назад +1

    Hey, im getting constantly this error when clicking the register button:
    "Failed to load resource: net::ERR_CONNECTION_REFUSED" and "Uncaught (in promise) TypeError: Failed to fetch
    at HTMLFormElement. (register.js:6:5)"
    What am I doing wrong?

    • @Elderny
      @Elderny  11 месяцев назад

      You fixed it?

  • @lgytop
    @lgytop 2 года назад

    At 1:00, even if the ID and password are the same, the solution does not work like the video. Which part should I watch?

    • @Elderny
      @Elderny  2 года назад

      Explain Little more

    • @lgytop
      @lgytop 2 года назад

      @@Elderny const jwt = require("jsonwebtoken");
      const db = require("../routes/db-config");
      const bcrypt = require("bcryptjs");
      const login = async (req, res) => {
      const { id, psword } = req.body;
      if (!id || !psword) return res.json({ status: "error", error: "아이디나 비밀번호를 입력해주세요" });
      else {
      db.query('SELECT * FROM users01 WHERE id = ?', [id], async (Err, result) => {
      if (Err) throw Err;
      if ( !result.length || !await bcrypt.compare(psword, result[0].psword)) return res.json({ status: "error",
      error: "아이디나 비밀번호를 확인해주세요"})
      else {
      const token = jwt.sign({ id: result[0].id}, process.env.JWT_SECRET, {
      expiresIn: process.env.JWT_EXPIRES
      })
      const cookieOptions = {
      expiresIn: new Date(Date.now() + process.env.COOKIE_EXPIRS * 24 * 60 * 60 * 1000),
      httpOnly: true
      }
      res.cookie("userRegistered", token, cookieOptions);
      return res.json({status:"success", success:"로그인 되었습니다"})
      }
      })
      }
      }
      module.exports = login;
      It is obviously the same code as the video, but even if the ID and password information are entered correctly, it is caught in the second if and does not return success

  • @evanralphvale
    @evanralphvale 2 года назад

    Thanks man! you're great🔥

  • @arinam2741
    @arinam2741 Год назад +1

    Thank you very much. It is very useful information.

    • @Elderny
      @Elderny  11 месяцев назад

      You're welcome 🤗, will make a new version soon and might as well start something good

  • @ishankumar137
    @ishankumar137 Год назад +1

    Hi i'm getting an error "[nodemon] app crashed - waiting for file changes before starting..." would you know how to fix this ?

    • @Elderny
      @Elderny  Год назад +1

      Check your server main file, and see what made it crash. Upload the code on GitHub and I'll take a look at it too

    • @amenanajeeb9313
      @amenanajeeb9313 Год назад

      I'm facing the same error.

    • @Elderny
      @Elderny  Год назад +1

      Text me on telegram: @elderny1

    • @ishankumar137
      @ishankumar137 Год назад

      @@Elderny Thanks so much. It's working now
      I the end of the video, could you do a tutorial on how you add the google API for email verification?

    • @amenanajeeb9313
      @amenanajeeb9313 Год назад

      The error was because the package.json didn't have "start" in "scripts". It is working now. Thank you 😊

  • @aymenomri8719
    @aymenomri8719 2 года назад

    hello i got this error at 55:47 and i didnt know how to fix it : Failed to load resource: the server responded with a status of 404 (Not Found) can u help me ?

    • @Elderny
      @Elderny  2 года назад

      Yes, what is the cause of error?

    • @aymenomri8719
      @aymenomri8719 2 года назад

      @@Elderny how did u do the logout ?
      what did u change d ?
      i keep getting the error connot get /api/logout

    • @Elderny
      @Elderny  2 года назад

      I didn't used /api/logout for logout. I basically moved the code for logout to routes/pages folder so that i can access logout page on just /logout

  • @anonymousgaming7999
    @anonymousgaming7999 10 месяцев назад

    Hello,
    My login information is not saving but browser showing the pages cookies

  • @BLSS08
    @BLSS08 Год назад +1

    @Elderny hey man could you help me with something? when I try to login i get this error in the terminal : ""httpOnly" is not allowed in "options" on login.js, around line 14. Any idea how to fix it?

    • @stefancomandant8683
      @stefancomandant8683 Год назад

      remove the "httpOnly: true" from that object

    • @Elderny
      @Elderny  11 месяцев назад

      I think you might've added httpOnly in wrong options object

  • @umrasiddiqui7557
    @umrasiddiqui7557 Год назад +1

    Error: Failed to lookup view "register" in views directory "./views" ...I've done everything exactly the same still getting this error...please help

    • @Elderny
      @Elderny  Год назад

      Check file names properly

  • @radzs9939
    @radzs9939 Год назад +1

    hi, I'm having an issue going to different pages. can you help me.

    • @Elderny
      @Elderny  Год назад

      Sure tell me more about it

  • @ressal5063
    @ressal5063 2 года назад

    mantap wkwa, very helpfuly

  • @ReillyAcademy
    @ReillyAcademy 2 года назад

    Great Video, thank you for your explanation.

  • @xami8535
    @xami8535 4 месяца назад

    what is your folder icon extension in VScode

  • @jonathanbair7688
    @jonathanbair7688 4 месяца назад

    does anyone know if this code is out dated or something cuz i cant register users

  • @gustuckit2052
    @gustuckit2052 Год назад +2

    Great vid! What color theme are you using in vscode?

  • @bsm_creations
    @bsm_creations 2 года назад

    Thank you so much sir.....
    This will help me a lot...

  • @gaganvishwakarma6494
    @gaganvishwakarma6494 Год назад

    1:22:32 what the Referral Link will do ?

    • @Elderny
      @Elderny  Год назад +1

      Referral link can be used for inviting your friends and get rewards for it or whatever thing you want to set it as

    • @gaganvishwakarma6494
      @gaganvishwakarma6494 Год назад

      @@Elderny Can you please elaborate what will be the logic when someone click on the referral link ?

    • @Elderny
      @Elderny  Год назад

      Yup, it's simple. Create few extra fields with name refer_code, referred_by
      Refer code would be every person's unique code, you can make the refer_code to be the I'd of the person itself it's upto you or you can keep random string in it with 6-7 alphabets. And referred_by will contain the refer_code of the user using whose link you joined. So, if you're registering using someone's referral link you'll add his refer_code in the referred_by field and that should be it.
      For counting how much people someone has referred you can just use the COUNT of SQL and select all users having your refer_code as their referred_by
      Or you can just create another field named refer_count which initially will be 0 but it'll increase by +1 each time someone's joins using the link (not preferred) as it can mess up *rarely*
      What I told you is 1 level referral system, you can add multi level referral system too by adding second_referred_by field and populate it accordingly (keep its value NULL by default same for referred_by) as initially your first user won't be referred by anyone cause you'll create it yourself more like first default row

    • @gaganvishwakarma6494
      @gaganvishwakarma6494 Год назад

      @@Elderny thankyou brother i implement all the stuff using MERN and it is working exactly like yours .

  • @janvijain3170
    @janvijain3170 Год назад +1

    Sir I got error
    Node_modules\express\lib
    outer
    oute.js
    throw new Error(msg);
    Route.get() requires a callback function but got a [object Object]
    Please help me I am getting this error again and again.

    • @Elderny
      @Elderny  Год назад

      Show me your code where it's router.get()

    • @janvijain3170
      @janvijain3170 Год назад

      @@Elderny sir how can I show you?

    • @Elderny
      @Elderny  Год назад

      Upload on GitHub and send me link

    • @janvijain3170
      @janvijain3170 Год назад

      @@Elderny
      Sir I have sent you already plz help me to come out of this error because it's very important

    • @janvijain3170
      @janvijain3170 Год назад

      @@Elderny
      Sir I have sent github link on your telegram also. It is deleting again n again from here

  • @rrebel9939
    @rrebel9939 Год назад +1

    You mentioned in the video that you weren't going to go through email validation. Do you know where I can find the source code for this email validation or a video?

    • @Elderny
      @Elderny  Год назад

      Nodemailer with Gmail api
      This will let you send emails for free
      And for validation generate a random unique uuid and store it in the database with verification_uuid and make another column with name verified which by default will be false
      Then create a different page with /verify or something in the url and when you'll send the link to the user add the verification uuid in the param like /verify?verify_uuid=uniqueuuid
      Afterwards, you can just use js to send some api request to your back-end where you are verifying the verification uuid and changing the verified to true wherever that verification uuid was present and you can just remove the verification uuid from the database

  • @gautamsaxenaf6041
    @gautamsaxenaf6041 10 месяцев назад

    great tutorial

  • @carloseferrero
    @carloseferrero 2 года назад

    Thanks men it was very useful

  • @Imjustachillegg
    @Imjustachillegg 4 месяца назад

    Back again so login.js is running register.js pls help bro

  • @arijbouazza7626
    @arijbouazza7626 3 года назад +5

    can you please provide a link to the source code? thanks

    • @Elderny
      @Elderny  3 года назад +9

      You want source code?

    • @yusufyuksel1197
      @yusufyuksel1197 2 года назад +3

      @@Elderny yes

    • @hafsiahmedo
      @hafsiahmedo 2 года назад

      Can you please provide us the link of source code . Thank you ;)

    • @hafsiahmedo
      @hafsiahmedo 2 года назад

      Well done! Good job . Thank you for the tutorial

    • @Elderny
      @Elderny  2 года назад

      I don't have the source code but I hope you learnt something :)

  • @Imjustachillegg
    @Imjustachillegg 4 месяца назад

    Login.js is running register.js pls help

  • @negwat-y7v
    @negwat-y7v 6 месяцев назад

    Did you use express in this video, I'm going to wtach the fulll video

  • @gihanvimukthi8774
    @gihanvimukthi8774 10 месяцев назад

    @elderny Thanx bro you are the best💌🤟

  • @haziqafham6344
    @haziqafham6344 2 года назад +1

    Hey man, can I have the latest source code because the github source code is outdated and in the controllers folder only have auth.js only. Thanks for your cooperation

    • @Elderny
      @Elderny  2 года назад

      Sure man I'll update soon

    • @haziqafham6344
      @haziqafham6344 2 года назад

      @@Elderny so is there any update regarding this matter ? also I have some confusion with the code because I did not understand the basic of the redirecting to other pages... how can I redirect my login page to my landing page.. please help me... really do appreciate it Thanks :)

    • @Elderny
      @Elderny  2 года назад

      Contact me on telegram: @elderny1

  • @d3nnywild782
    @d3nnywild782 Год назад

    Hey do you have a suggestion on how to make this work with mssql?

    • @Elderny
      @Elderny  Год назад

      Aren't we using MySQL?

  • @mautlej1868
    @mautlej1868 11 месяцев назад

    Thank you. You are real.

    • @Elderny
      @Elderny  11 месяцев назад +1

      I'm planning on making easy to understand and better one soon

    • @mautlej1868
      @mautlej1868 11 месяцев назад

      @@Elderny Also when im loging i get this error: C:\Users\saitz\Desktop\Panel\app
      ode_modules\jsonwebtoken\sign.js:107
      return failure(new Error('secretOrPrivateKey must have a value'));
      ^
      Error: secretOrPrivateKey must have a value
      at module.exports [as sign] (C:\Users\saitz\Desktop\Panel\app
      ode_modules\jsonwebtoken\sign.js:107:20)
      at Query. (C:\Users\saitz\Desktop\Panel\app\controllers\auth.js:30:35)

    • @Elderny
      @Elderny  11 месяцев назад

      Looks like your secret key doesn't have any value check properly if you're providing that value if you're getting it from .env make sure you're using require('dotenv').config() in your main index or app file

    • @mautlej1868
      @mautlej1868 11 месяцев назад

      @y so that means that i need to create a .env and add the db connection parameters? and what should they be?

    • @Elderny
      @Elderny  11 месяцев назад

      You've two options either directly give the database value or either through variable or using .env

  • @ishankumar137
    @ishankumar137 Год назад +2

    Hi would you be able to do tutorial showing how you added the advance features that you showed in the end?

    • @Elderny
      @Elderny  Год назад

      Sure bro, I'll do that soon! Just let me put it in my schedule

  • @lgytop
    @lgytop 2 года назад

    very good

  • @Imjustachillegg
    @Imjustachillegg 4 месяца назад

    What theme do you use I like it lol!!

  • @Nava-Majumdar
    @Nava-Majumdar 2 года назад +1

    sir i got this error for the form in login.html: A 'return' statement can only be used within a function body.

    • @Elderny
      @Elderny  2 года назад +3

      I saw that returning like that is not supported so i would say to when listening to the submit event listener do e.prventDefault()
      provide e as a incoming argument
      And brother give me full page code this issue should not actually be come and if doesn't cause any issue just ignore the error

    • @Nava-Majumdar
      @Nava-Majumdar 2 года назад

      @@Elderny thank you

  • @dhananjaybedarkar5934
    @dhananjaybedarkar5934 2 года назад +1

    I got an error during i register the email and password.... please help me
    and pls share the source code it will be very beneficial for me.
    fetch("/api/register",{
    method:"POST",

  • @YashDesai-uj3tl
    @YashDesai-uj3tl 2 года назад

    Because profile me put method hei to usko kese handle krege??

    • @Elderny
      @Elderny  2 года назад

      Which put method?

    • @YashDesai-uj3tl
      @YashDesai-uj3tl 2 года назад

      I am making profile after login and registration but profile table data is not fetch how I can fetch

    • @YashDesai-uj3tl
      @YashDesai-uj3tl 2 года назад

      You should make profile page

  • @bikashadhikari6737
    @bikashadhikari6737 2 года назад

    Cannot POST /api/register i have this kind of issue how to fix?

    • @Elderny
      @Elderny  2 года назад

      Properly check the router setup, check if router is setup for post request

    • @bikashadhikari6737
      @bikashadhikari6737 2 года назад

      @@Elderny how can i do that? i'm like a new so please elp me out

    • @Elderny
      @Elderny  2 года назад

      @@bikashadhikari6737 the file from where we export the router module check that file

    • @bikashadhikari6737
      @bikashadhikari6737 2 года назад

      @@Elderny
      pages.js:
      const express = require("express");
      const router = express.Router();
      router.get("/", (req, res) => {
      res.render("index");
      })
      router.get("/register", (req, res) => {
      res.sendFile("register.html", { root: "./public" });
      })
      router.get("/login", (req, res) => {
      res.sendFile("login.html", { root: "./public" });
      })
      module.exports = router;
      result : register.js:6 POST
      localhost:8000/api/register 404 (Not Found)
      (anonymous) @ register.js:6
      VM322:1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
      public/js.reister.js:
      form.addEventListener("submit", () => {
      const register = {
      email: email.value,
      password: password.value
      }
      fetch("/api/register", {
      method: "POST",
      body: JSON.stringify(register),
      headers: {
      "Content-Type": "application/json"
      }
      }).then(res => res.json())
      .then(data => {
      if (data.status == "error") {
      success.style.display = "none"
      error.style.display = "block"
      error.innertext = data.error
      } else {
      error.style.display = "none"
      success.style.display = "block"
      success.innertext = data.success
      }
      })
      })
      controllers/regeister.js:
      const db = require("../routes/db-config");
      const bcrypt = require("bcryptjs");
      const register = async(req, res) => {
      const { email, password: Npassword } = req.body
      if (!email || !Npassword) return res.json({ status: "error", error: "Please enter your email and password" });
      else {
      console.log(email);
      db.query('SELECT email FROM users WHERE email = ?', [email], async(err, result) => {
      if (err) throw err;
      if (result[0]) return res.json({ status: "error", error: "email has already been regestered" })
      else {
      const password = bcrypt.hash(Npassword, 8);
      console.log(password);
      db.query('INSERT INTO users SET ?', { email: email, password: password }, (error, results) => {
      if (error) throw error;
      return res.json({ status: "success", success: "User has been regestered" })
      })
      }
      })
      }
      }
      module.exports = register;

    • @amenanajeeb9313
      @amenanajeeb9313 Год назад +1

      In routes --> pages.js, we have APIs written.. I'm just showing the part where the change is to be made..
      {root: "./public"}
      The route has to be given correctly.. dot and / have to be dealt with carefully. For both register and login.
      I hope this helps.

  • @evanadhiarja
    @evanadhiarja Год назад

    hei elderny how to make after we registered we will directed to login page, thanks!

    • @Elderny
      @Elderny  Год назад

      just this js code: window.open('/login','_self')

    • @evanadhiarja
      @evanadhiarja Год назад

      @@Elderny thanks!

    • @evanadhiarja
      @evanadhiarja Год назад

      @@Elderny where shoud i put it btw

    • @Elderny
      @Elderny  Год назад

      In the .then response of the fetch api like when you get response back from Register as success you put it inside setTimeout about 3 seconds

  • @ZajebisteJakPojebane
    @ZajebisteJakPojebane 2 года назад +1

    @Elderny Hello,
    I have a question: could you explain why I'm still logged in when I try to use 2nd or 3rd private session on my browser?
    What should I change to have myself "not-logged in" while using new private windows on a browser?
    Thank you for this tutorial

    • @Elderny
      @Elderny  2 года назад

      Well actually we are saving the cookie in ones browser, and if you try anything you can't let yourself logout if you open some more windows. If this is not your exact question then explain more 🙂

    • @ZajebisteJakPojebane
      @ZajebisteJakPojebane 2 года назад

      @@Elderny so the cookies are stored throughout the whole browser no matter if its public or additional private session opened?

    • @Elderny
      @Elderny  2 года назад

      @@ZajebisteJakPojebane private sessions shouldn't have cookies stored

  • @codewithdahir
    @codewithdahir 8 месяцев назад

    1:01:19 there is a lag in the video please fix it

    • @Elderny
      @Elderny  8 месяцев назад

      Like what

    • @codewithdahir
      @codewithdahir 8 месяцев назад

      ​@@Elderny when you were checking the browser to login again you didnt record the browser it stays at the editor while you explaining things until 1:04:13

  • @atmanatos7165
    @atmanatos7165 2 года назад +1

    Awesome video but no forgot password feature. Can you do a video on this @Elderny?

    • @Elderny
      @Elderny  2 года назад

      What you want

    • @Elderny
      @Elderny  2 года назад

      Sure, it's easy to make forgot password :)

    • @atmanatos7165
      @atmanatos7165 2 года назад

      @@Elderny Consider making a video on implementing the forgot feature

  • @LeslieLopez-bh4st
    @LeslieLopez-bh4st Год назад +1

    El proyecto lo puedo emplear en react

    • @Elderny
      @Elderny  11 месяцев назад

      yup, soon making a new video

  • @AdamAdam-sk9ne
    @AdamAdam-sk9ne 2 года назад +1

    Hello @
    Elderny, how to do redirect after clicking login button to my main page ?

    • @Elderny
      @Elderny  2 года назад +2

      In js write: document.location.replace("/")

  • @ateebkhan2695
    @ateebkhan2695 2 года назад

    @Elderny Can you share your VSCode settings for me like font or theme.

    • @Elderny
      @Elderny  2 года назад +2

      Ok bro, cobalt 2 theme font is cascadia code

  • @qwerty-hn3iu
    @qwerty-hn3iu 2 года назад +4

    Hello. Can you upload all the source codes, I want it for my guide in my projects. Thank you 😊🙏🙏

    • @Elderny
      @Elderny  11 месяцев назад

      I'll soon make new video

  • @pranjalsengar4331
    @pranjalsengar4331 Год назад

    13:15 I thought my device hanged 😂

  • @dscodes4909
    @dscodes4909 2 года назад +1

    sir, i need the source code for it please....

    • @Elderny
      @Elderny  2 года назад

      Ok, i uploaded link

  • @aayushpratapsingh8858
    @aayushpratapsingh8858 Год назад

    The error you had in login page of undefined, i am having the same error in register page
    What can i do?? please help

    • @Elderny
      @Elderny  Год назад

      Cross check the variable

  • @Rise_and_Shine1
    @Rise_and_Shine1 Год назад

    Great Work Bro But Can You Make The Pages More Beautiful With Css

  • @motivational_gurru
    @motivational_gurru 2 года назад

    I'm learning node and your video very useful... Can you upload edit profile and verify email video please 🙇🏻‍♂️🙇🏻‍♂️🙏🏻🙏🏻

  • @muhamadabibbasnuril1343
    @muhamadabibbasnuril1343 2 года назад

    @Elderny hello,
    I'm getting undefined value in index.ejs after user has logged in so no email is shown after user logged in
    Welcome

    Please Login
    when i try to console.log (),it show that im getting undefined,how to fix it?

    • @Elderny
      @Elderny  2 года назад

      well, properly check for the variable email in the code

    • @muhamadabibbasnuril1343
      @muhamadabibbasnuril1343 2 года назад

      @@Elderny in which file?login.js in controller?

  • @nightfall6889
    @nightfall6889 2 года назад +1

    thanks for creating this video but you didn't share the source code that's the worst part bcz people are facing lot of problems with this code. plz share this source code it'll be more helpful

    • @Elderny
      @Elderny  2 года назад

      Oh, i don't have code available right now brother :(

  • @BrunoHsdc
    @BrunoHsdc 2 года назад

    Your source code for this project is all wrong, please fix it =/

    • @Missionbebetter
      @Missionbebetter 2 года назад

      Actually, i lost the original code. I saw i had written some code for login already so i shared available one

  • @sidiyahyasidibrahim4261
    @sidiyahyasidibrahim4261 2 года назад

    thanks you sir

  • @captaintown
    @captaintown 2 года назад

    Thanks

  • @s.b.t9503
    @s.b.t9503 8 месяцев назад

    1:2:50 this video is stopped

  • @Hikz-w3w
    @Hikz-w3w Год назад

    thanks

  • @ankur4574
    @ankur4574 2 года назад +1

    8:28

  • @yazanstar5806
    @yazanstar5806 2 года назад

    90% of the viewers are watching to copy the code without understanding it. However, what is the point of waisting your time on something if you’re not gonna explain it? I bet you’re Arabic, no wonder I have switched to English people.

    • @Elderny
      @Elderny  2 года назад

      I did tried to explain it, i didn't wanted to explain total basic things so the video will become few hours long.

    • @yazanstar5806
      @yazanstar5806 2 года назад

      @@Elderny your work is good and your English is perfect. However, I was here to get a syntax of something but I noticed how fast and unclear you was “especially if a beginner is watching”. It could be better to split your work into several videos.

    • @Elderny
      @Elderny  2 года назад +2

      Thanks for that, and yes i already noticed that thing. I wanted to fix the speed but the video was already there. In my future videos I'll try to maintain my speed and proper explanation. Have a nice day :)

  • @YashDesai-uj3tl
    @YashDesai-uj3tl 2 года назад

    AMA j profile page continue kro yarr

    • @Elderny
      @Elderny  2 года назад

      Bro easy ha profile page, contact me on telegram for guidance

  • @qudusolalekan2505
    @qudusolalekan2505 2 года назад

    Yes sir, we need the source code

    • @Elderny
      @Elderny  2 года назад

      Ok, wait I'll share in some time

    • @qudusolalekan2505
      @qudusolalekan2505 2 года назад

      @@Elderny thanks sir... Because I followed your video but couldn't get it to the end... Am having issue with the req.user

    • @Elderny
      @Elderny  2 года назад

      @@qudusolalekan2505 what is it

  • @ankur4574
    @ankur4574 2 года назад

    26:20

  • @incredibleman2719
    @incredibleman2719 Год назад

    For real dude? Big dislike for this!
    After 1.00 your screen is not recorded, and what we should do? Imagine how you work???

  • @ankur4574
    @ankur4574 2 года назад

    1:07:49

  • @ankur4574
    @ankur4574 2 года назад

    26.20

  • @darshanqseksolutions9812
    @darshanqseksolutions9812 2 года назад

    Too much complicated code😵‍💫😇

  • @ankur4574
    @ankur4574 2 года назад

    -53:38

  • @justin_rajadurai
    @justin_rajadurai Год назад

    1:03:28
    wtf

  • @OkekeNwachukwu
    @OkekeNwachukwu 11 месяцев назад

    code: 'ER_BAD_DB_ERROR',
    errno: 1049,
    sqlMessage: "Unknown database 'sql_login'",
    sqlState: '42000',
    fatal: true
    this is what am getting in my node after trying to connect to database i did everything as you did

    • @Elderny
      @Elderny  11 месяцев назад

      Have you created sql_login database in MySQL phpmyadmin

    • @OkekeNwachukwu
      @OkekeNwachukwu 11 месяцев назад

      yes and i have solved the error but i have a new error@@Elderny
      C:\Users\User\chat_room\index.js:13
      db.connect((err)=>{
      ^
      TypeError: db.connect is not a function
      at Object. (C:\Users\User\chat_room\index.js:13:4)
      at Module._compile (node:internal/modules/cjs/loader:1256:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
      at Module.load (node:internal/modules/cjs/loader:1119:32)
      at Module._load (node:internal/modules/cjs/loader:960:12)
      at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
      at node:internal/main/run_main_module:23:47
      Node.js v18.17.0
      [nodemon] app crashed - waiting for file changes before starting...

    • @Elderny
      @Elderny  11 месяцев назад +1

      Confirm that db variable is properly defined and does contain some value try console logging and debug where is the issue

    • @josephezra1701
      @josephezra1701 5 месяцев назад

      Thanks I have solved the error but am stuck on the 50th minute of the tutorial I try to login but I get this error on the browser uncaught error in promise failed to fetch and the fetch api longin is highlighted​@@Elderny

  • @knockout9644
    @knockout9644 2 года назад

    Yo, wassup bro, can u gimme a social link, i wanna to talk with you, telegram/discord/whatsapp❤️👍
    After that, keep going my dear 🌷🌷

    • @Elderny
      @Elderny  2 года назад

      @elderny1 telegram, elderny#7338 discord

    • @knockout9644
      @knockout9644 2 года назад

      @@Elderny thx 🌹🌹, i will contact u soon, have a great time.

  • @shravanisawant2271
    @shravanisawant2271 2 года назад +1

    db.connect is not a function
    Showing this error while running nodemon. What to do?

    • @Elderny
      @Elderny  2 года назад

      check if you're exporting db config properly

  • @richie6461
    @richie6461 7 месяцев назад

    Please, I keep getting this error " 404 Not Found" and the " fetch ( '/api/register', ..." is highlighted. Can you help me?

    • @Elderny
      @Elderny  7 месяцев назад

      You might've not properly setted up the routes

    • @richie6461
      @richie6461 7 месяцев назад

      Can you explain it well for me? Which file or files should I check ?

    • @Elderny
      @Elderny  7 месяцев назад

      Text me on telegram @elderny1

  • @dscodes4909
    @dscodes4909 2 года назад +1

    sir, i need the source code for it please....

    • @Elderny
      @Elderny  2 года назад

      I'd love to but i delete all folders that i make in video

  • @sameersahto
    @sameersahto 2 года назад +1

    In controllers folder in register.js it shows error it says email is not identified

    • @Elderny
      @Elderny  2 года назад

      Check all variables properly, and check if you defined email or not. Check if you're sending email in request

    • @sameersahto
      @sameersahto 2 года назад

      I have checked it can't find where is the problem can you check the code for me please 🥺

    • @Elderny
      @Elderny  2 года назад

      Ok upload the code somewhere and I'll check

    • @sameersahto
      @sameersahto 2 года назад

      @@Elderny
      Thank you so much
      drive.google.com/file/d/10dpj33RIMxrTkqk-Lcn7aoSSqkAmZyz9/view?usp=sharing