i). 00:00 Introduction ii). 05:30 Start the server iii). 11:07 Connect to the database iv). 20:18 Secure the environment v). 21:36 Create API/service 'createUser' vi). 34:44 Create other services vii). 38:23 Define controllers for the services vii). 43:57 Define routers viii). 51:45 Create login API ix). 1:01:02 Middle-ware for token validation Thanks for the tutorial. Very informative!
This is exactly what i am looking for. You sir, just saved my job. Thank you for making this tutorial. May you kindly make a playlist of how to write apis using Mqsl with Nodejs.
you are awesome brother.i have no word for you to thankyou.i cant explain my happiness..you did really good job..this is the thing which i want..like in professional way..thankyou man thankyou...please make more video in node js in professional way..
Thanks a lot Bro, i'm a student and it was one of the bests tutorials i've ever seen ! Can you please do a tuto for how to use it with VueJS or ReactJS ?
Great video and just what I was looking for. One question though, fsevents appears to be one of the package dependencies but npm will not install that package as it only works for Mac OS. Do you know if a workaround or alternate package for Windows dev environments?
Nice video, I learned a lot. I have a question, if you require a valid jsontoken to create a user, and you only provide this token only when you login, how do the users can sign up (create its user) in the first place? Thanks in advance.
Yes you have pointed out very good question. Let me tell you my friends I was trying to keep this video as simple as possible so everyone can atleast get basic idea how to make rest apis but in real use there will a lot of checkpoint and bypass condition
facing the issue in bcrypt,when i execute post "Error: data and salt arguments required at hashSync" like error is showing... After change the key and value of header in postman also showing same error.
this error occurs occurs in hashSync() check if body.password is getting undefined or null instead of this ---> body.password = hashSync(body.password, salt); write this --> if(body.password){ body.password = hashSync(body.password, salt); } in updateUser, under user.controller.js file
*****NEED HELP***** at 25:00, everything works fine if I use string values in the insert statement instead of (?,?,?,?,?,?) and data array but when I insert the (?,?,?,?,?,?) and data array I get an error stating code: 'ER_BAD_NULL_ERROR', errno: 1048, sqlMessage: "Column 'firstName' cannot be null", sqlState: '23000', index: 0, sql: 'INSERT INTO users(firstName, lastName, gender, email, password, number) VALUES(NULL,NULL,NULL,NULL,NULL,NULL)'
Hello sir, we good video to understand the whole process....Thank for it, but I get stuck in hashing part, when I am using comparesync it is returning false each time.
Thanks for nice video. But the problem Sql and NodeJs is, how to handle one-many-table without repeating the data like [{id:1, images:[image1, image3, ...]}]
I am finding the patch/ update user service result is not an array, so results[0] returns undefined, simple returning results seems to work. Same with deleteUser
Hi, thank you for this awesome walktrough! I've a question... When I submit my form in react, the server show me 'Error: data and salt arguments required ' ... How could I solved this problem? Sending the JSON from postman, it works well...
Hello, when I have a database error (Violation of UNIQUE KEY constraint for exemple), the API crash with the Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client. Do you know why?
Exsume Babaji, can I ask you an example on making multiple queries? Because in my example I need to insert some rows in an other table in order to keep the consistency of the foreign key. Thank you in advace, your videos are very great.
greate video :D one question please... Should I put conectionLimit parameter on pool configuration? What happens if I do not put this parameter? Thanks for your attention :D
I don't get it, How can you login without adding an user? The user first needs to register then login, isn't it? How am I supposed to login if I am not registered?! passing bearer token while registering doesn't make any sense.
You are right. I was just trying to show the concept. In normal scenario add user will be signup or registration there we will not add token validation
I am not getting any response in my postman however data is being posted my database...Any specific reason for this ? not getting any response in my postman
thanks, This video help me a lot. and also I have one doubt, What is the code for POST and GET .help me with this , if I run the URL in chrome it shows CANNOT GET /.
Are we using nodejs orm here?? If not I would watch I want to run raw queries inside from nodejs and want that. If you have any resources related to that pls help
I used postgres in my case. my jsontoken not showing .It say invalid email or password even though my email and password is exactly the same. My password data type is character varying : 255 length
Joi my WhatsApp group for query and help chat.whatsapp.com/GsuvlYqwHFT0E27pUikeY0
This group is full
Can't join
i). 00:00 Introduction
ii). 05:30 Start the server
iii). 11:07 Connect to the database
iv). 20:18 Secure the environment
v). 21:36 Create API/service 'createUser'
vi). 34:44 Create other services
vii). 38:23 Define controllers for the services
vii). 43:57 Define routers
viii). 51:45 Create login API
ix). 1:01:02 Middle-ware for token validation
Thanks for the tutorial. Very informative!
why didn't you use sequelize??
This is exactly what i am looking for. You sir, just saved my job. Thank you for making this tutorial. May you kindly make a playlist of how to write apis using Mqsl with Nodejs.
great brooo...👌👌👌 1 week se dhundh raha tha finally i got you are best bro....
Brazil here.
Thanks for this stuff.
Best video on this topic so far!
You made my day! clear and neat explanation. Thank you.
Hey this is the best tutorial I have seen so far, thanks
Great share my friend. 😁
very good tutorial point to point no time wasting thanks sir
This video is really too specific and much helpful for me, Thanks bro
you are awesome brother.i have no word for you to thankyou.i cant explain my happiness..you did really good job..this is the thing which i want..like in professional way..thankyou man thankyou...please make more video in node js in professional way..
Truly an amazing tutorial. So helpful omg
Love you bro I have done with signup also❤️❤️
Thank you so much! I thoroughly enjoyed this tutorial. Would you be able to make a tutorial on how to connect this to the frontend of the application?
got to know so many small points which i missed in my project . Thanx bro
Thank you sir. Please continue on!
Very informative and practical. The explanation and sequence of tutorial is too good and easy to understand. Thanks
Best and simple explanation make more videos like this
wow.. Awesome tutorial bro... now i learned express and node. Thanks a lot.
Thanks for the video now I will use these api in my android application
Thanks a lot Bro, i'm a student and it was one of the bests tutorials i've ever seen ! Can you please do a tuto for how to use it with VueJS or ReactJS ?
This helps me a lot. Please create more video sir
Thank you, great! This was what I needed to secure the backend for my Vue app 🙂
Thanks Technical Babaji. It's really very well explained.
You are just awesome..... Amazing tutorial..... Thanks from the bottom of my heart
Thanks re.. Kaam aayega bohot ye. :)
Excellent tutorial! Thanks for your spended time!
great work bro
The tutorial was very helpful, thank you so much
Thank you. I am new to this and this cleared a lot of confusion. 👍
Really Awesome. Your work so much Appreciated...
the best tutorial ,thanks a lot bro, just keep going to do useful tutorial like this .
very clear explanation with step wise.
Great video and just what I was looking for. One question though, fsevents appears to be one of the package dependencies but npm will not install that package as it only works for Mac OS. Do you know if a workaround or alternate package for Windows dev environments?
Thanks a lot, I transform the API to connect a SQL Server database with succes.
This is a great tutorial contain so much. I learned a lot that will be very useful for me. Thanks so much!
This was really hepful mate! Okay? Fine!
hahaha
Excellent tutorial! Thank you
Nice video, I learned a lot. I have a question, if you require a valid jsontoken to create a user, and you only provide this token only when you login, how do the users can sign up (create its user) in the first place? Thanks in advance.
Yes you have pointed out very good question. Let me tell you my friends I was trying to keep this video as simple as possible so everyone can atleast get basic idea how to make rest apis but in real use there will a lot of checkpoint and bypass condition
This video is so awesome dude
Thank you..Super explation and this video very helpful for me🤩😍
Worth to watch. Thanks.
Exactly what I needed. Thank you
facing the issue in bcrypt,when i execute post "Error: data and salt arguments required at hashSync" like error is showing...
After change the key and value of header in postman also showing same error.
this error occurs occurs in hashSync()
check if body.password is getting undefined or null
instead of this ---> body.password = hashSync(body.password, salt);
write this --> if(body.password){
body.password = hashSync(body.password, salt);
}
in updateUser, under user.controller.js file
Thanks, awesome tutorial!!! It would be great if you created another video with good practices for creating restfull apis!
Very nice tutorial !!!! good job
*****NEED HELP*****
at 25:00, everything works fine if I use string values in the insert statement instead of (?,?,?,?,?,?) and data array but when I insert the (?,?,?,?,?,?) and data array I get an error stating
code: 'ER_BAD_NULL_ERROR',
errno: 1048,
sqlMessage: "Column 'firstName' cannot be null",
sqlState: '23000',
index: 0,
sql: 'INSERT INTO users(firstName, lastName, gender, email, password, number) VALUES(NULL,NULL,NULL,NULL,NULL,NULL)'
Hello sir,
we good video to understand the whole process....Thank for it,
but I get stuck in hashing part,
when I am using comparesync it is returning false each time.
Hi...thanks buddy...its so much helpful..😊😊
Great tutorial. I have one question why use PATCH instead of PUT for update action ?
Anything you can use its upto you. There is no restriction
@@TechnicalBabaji1 Thanks & if i am integrating this API with react frontend then how to send the token from there ?
Perfect explanation
thanks for sharing. good video!
Thanks, well done my friend
Thanks for nice video. But the problem Sql and NodeJs is, how to handle one-many-table without repeating the data like [{id:1, images:[image1, image3, ...]}]
thanks for this awesome tutorial bro
hi, I am facing one problem, when i am using "getUsers" , I am getting "res.json is not a function" error, why this happens, please help me.
Great topic 👍
I am finding the patch/ update user service result is not an array, so results[0] returns undefined, simple returning results seems to work. Same with deleteUser
May be they have updated the library 📚
Hi, thank you for this awesome walktrough!
I've a question... When I submit my form in react, the server show me 'Error: data and salt arguments required
' ...
How could I solved this problem? Sending the JSON from postman, it works well...
Even I'm getting the same error.how to solve this?
@@sanjyotvelip6462 while updating i am gettingsame error
Hello, when I have a database error (Violation of UNIQUE KEY constraint for exemple), the API crash with the Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client. Do you know why?
Thanks, this tutorial help me a lot
To anyone who might need it
If you get an error on post func - creating user
Try changing the postman body type form text to JSON
god
@@jayvele1804 Glad I could help
Exsume Babaji, can I ask you an example on making multiple queries? Because in my example I need to insert some rows in an other table in order to keep the consistency of the foreign key. Thank you in advace, your videos are very great.
Could you, please, explain the "null" first parameter of the callback functions on the services files? Thanks
First parameter is reserved for errors if its null means no error we could check second parameter which is reserved for results
greate video :D one question please... Should I put conectionLimit parameter on pool configuration? What happens if I do not put this parameter? Thanks for your attention :D
If you will not provide it will take default value which is 10
Technical Babaji if I put my project on production, 5000 limit conection number is good or is it so expensive?
I don't get it, How can you login without adding an user? The user first needs to register then login, isn't it? How am I supposed to login if I am not registered?! passing bearer token while registering doesn't make any sense.
You are right. I was just trying to show the concept. In normal scenario add user will be signup or registration there we will not add token validation
Thank you very much sir .
Thank you!! Very helpfull!
Is this code still working to the current version of the dependencies?
please add your video also like trending now, else i have sleeped few times in this video
You did well! thank so much
got this error TypeError: Assignment to constant variable. and this due to reassignment of const variable token but in your case how did you handle
you installed node js beforehand?
Thanks for the code!
I am not getting any response in my postman however data is being posted my database...Any specific reason for this ? not getting any response in my postman
I can't say what is the root cause because anything you will miss then request will continue without any response. Please debug the api
thanks, This video help me a lot. and also I have one doubt, What is the code for POST and GET .help me with this , if I run the URL in chrome it shows CANNOT GET /.
Just add slash before /api/users
Thank you so much sir
Welcome
You can make a video for building this API on server? Heroku or somethings
Are we using nodejs orm here?? If not I would watch I want to run raw queries inside from nodejs and want that. If you have any resources related to that pls help
Could you, please, explain this err? Error: data and salt arguments required. Gives the err When I try to post the first user?
Thanks you so mush very usefull
insert post user succes on db but i didnt received the callback? any idea?
Thank you for this video,So I want to know how to create logout
Hii i am facing error 1:00:05 after solving not working
This is a very good tutorial! Can you please also do the same tutorial again but with Postgresql instead of MySQL (including Vue js if possible)?
Thankyou sir. But where the JWT token stored?
Hi, Great tutorial, what if i want to update only one or two columns.
We use fieldName and fieldValue and we create dynamic query so we can pass any field and their value.. it will update to specific field
Thanks for sharing
Why you don't use prisma?
wow super video
Thank You so much. I have learned a lot in this video.
Most welcome.. keep supporting us
I am using mysql workbench and every thing is going alright but i am not able to conect to database...........?
can any one pleasehelp me?
why didn't you use sequelize??
I used postgres in my case. my jsontoken not showing .It say invalid email or password even though my email and password is exactly the same. My password data type is character varying : 255 length
I need to your code then only I can say that
@@TechnicalBabaji1 here is a link to the code: github.com/ricomwas/node-project
I was able to figure it out, I added the rows[0] on the callBack results.
why i m getting error of (data and salt arguments required )
Thank you so much
Tutorial is awesome,buti get the error while testing the post method ERROR: data and salt argument required. Pls guide to solve this
I have the same error...
Thanks but when I post or get it says...
"success": 0,
"message": "Access Denied! Unauthorized User"
I am getting socket hang up error in postman.. no idea how to fix this