I've gone through dozens of videos on this topic, I was finally able to get this going through this; you're very clear and concise. I mean, thanks to all the others for adding to my knowledge base, but it goes a long way to create a video where someone who can speak clearly and knows what they are doing, without wasting time. Thank you.
This is exactly what I think every time I want to learn something new. Brad is one of the few that is genuine, not overly and grossly enthusiastic, explains clearly, and is even funny at times which helps ease the learning process. He has a natural ability to make learning fun in this category.
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
Hi Brad, thanks for this video. I have a request in countinuation this video. I would be more than happy to pay for that course. A detailed course on Sequilize ORM for Node teaching basics of Sequilize and also Database Design using Sequilize. There are not much great resources on it and it would be great to have a course from you. Please consider this once :-)
Thank you Brad. Why is it that you seem to be the only guy on the internet who can explain things so that they're easy to understand, easy to implement and don't waste your time? You helped me so much (with your Udemy courses and TH-cam videos) I cannot thank you enough. You rock :)
Was just building an express mysql2 api just for fun to practice and forgot how to use "?" for escape characters in queries to prevent sql injection. Fast forwarded to 17:30 and got my answer. Thanks TraversyMedia. I am now a professional web dev working on a contract with the DoD and your TH-cam channel really helped me to become the web developer that I am today.
i regret not learning node backend development a few years ago, and sticked with laravel and codeigniter as the companies i was working for had projects in those. Thank you for this Brad. Your NodeJS Tutorials are very easy to get and understand. Thank You.
Great video. I was coming from mssql and had to find this specific video on how to link node.js with MySQL. Spot on. Thanks for the video, really helpful and well executed. Simple and easy, no messing around.
this is some of the channel on which i don't skip ads...for now this is the best i can do to help this channel. and i am commenting while that long ass ad is playing. :)
That's plenty. Thank you. I know ads really suck. I do the same thing though for all the creators I watch and enjoy. Especially if you are really liking the content and you just want to hurry up and skip. People like you are the reason I do this, it shows your appreciation and boosts my drive to create more free content :)
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
I tried your video using mamp. At first I couldn't access the db, but in the case of the mamp I changed the password to 'root' and it worked. I learned a lot.Thanks from Japan.
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
don't know why people are using mongodb or postgre sql in tutorial of nodejs with expression. this tutorial simply show how to connect with database (mysql). it is very very helpful. thanks a lot.
Those who are getting "ER_NOT_SUPPORTED_AUTH_MODE" error in the DB connection, try the newer NPM package "mysql2". It supports advanced authentication that MySQL 8.0 requires. Here's the NPM page link: www.npmjs.com/package/mysql2
This is really good. You know it oops at number one on the search... You really need to make an update on this... Its been six years now... You know many things must have changed overtime
Okay, so after a long day and a half, here's what I did to get this working. Hoping it helps anyone who struggled at it like i did. First, it's important to have your MySQL configuration set to legacy for password values as the connection from node kept throwing an error due to protocol mismatch. Once i reconfigured MySQL to the legacy, it finally connected. He doesn't cover installing Bash, so do an npm install bash after you install Terminal, then click the plus sign on the terminal to get the bash terminal. Once you do these things, following this tutorial is easy and does what it is supposed to do. Thank you
Wow, very informative, thanks! I watched this video to see if it would show me what I need to begin building a project, and it gives me what I need *and more*, so I'll definitely be rewatching.
In ES6, when you have one function parameter, you can delete the parentheses which makes the code cleaner in my opinion :) db.connect( err => { if (err) { throw err } }); will still work.
Though one could argue that the parentheses shows clearly that it's a group of arguments, also it you want to use rest operator then you need to add parentheses. Sometimes you have to think how does it look to someone who's never seen your code and how easy is it to reason about your program. But I also prefer the cleaner look, but just wanted to show a reason why keeping it might be better, at-least if you are working within a team.
Thank you so much for your video. It was really helpful for me. I was having hard time in a web project. then your video saved my life.
7 ปีที่แล้ว +126
24:30 - line 87 - that's a nice candidate for SQL injection :)
7 ปีที่แล้ว +48
He is concatenating SQL query with string he receives from user request. So if user in that requests sends malicious SQL query it will get executed. This vulnerability basically allows you (as a hacker) to do anything with target database.
Fortunately you may use "Escaping query values": github.com/mysqljs/mysql#escaping-query-values So in this case the query may look like this: let sql = 'UPDATE posts SET title = ' + connection.escape(newTitle) + ' WHERE id = ' + connection.escape(req.params.id) +';
Thanks Brad! Very helpful. One thing I really don't understand is the adding post part from min 17:40. Why is this hard coded and not dynamically added through postman or the url input field? Anyone an answer? Thanks a lot!
Travis why are you using app.get to post instead of app.post? and to update you use get instead of put? and last thing, should not be better to use the "?" in the update to avoid sql injection?
Basically, the reason for the get is because my goal of the video was to display how the MySQL driver works. I guess I kind of guessed that if people are using node they know not to do this but I probably should have mentioned it if I didn't.
your right this does display how the mysql driver doesnt really care about the type of request it is getting and mysql is not complaining when its getting the actual code in sql. but i would mention it when there is and actual user interface and the request is coming from a form.
Really great video! I've twisted the code a little bit to send the results of the query to the screen like 'res.send(results)' for a better development experience! Thanks a lot
I am using MAMP (not pro) and I had a hard time tracing the cause the error it was giving me when db.connect( ) runs. The solution I found was to enter the following argument into createConnection( ) : port: '/Applications/MAMP/tmp/mysql/mysql.sock', Hope this helps somebody! Also, Traversy, once beautifully concise video as always!
11:00 when i use a password, i get an error. Removing the pw removes the error. Any ideas? ty! code: 'ER_ACCESS_DENIED_ERROR', errno: 1045, sqlMessage: "Access denied for user 'root'@'localhost' (using password: YES)", sqlState: '28000', fatal: true
Whats the point of putting the query in a variable? doesn't seem to be used for anything? let query = db.query(sql, (err, result)=>{ }); at 18:16in the video. What am I missing?
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
@@hyperxjourney5837 Yeah thanks bro. I solved it. The problem was that when the program couldn't find anything in database the value coming back was null. So just used an if else statement and the problem was solved.
11:52 It says database created but it won't show up in phpmyadmin through xampp. also I know it got created because if I try again it tells me that the database already exists.
Гоуем си, брат! (You are big one, brother (брат == brother, Brad is similar to Брат and sounds the same in my language - Bulgarian :) ) You are the best, really! Bless you! Have a great and lovely new year!
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
Well explained, nice tutorial. I just have one question, aren't we supposed to use app.delete when we are making delete query instead of app.get? Same goes for app.put or app.patch on update query instead of app.get.
Excellent video, Brad. I have a question. What does the query return? I see RowDataPacket. But what is that? A list of objects? List of lists? Thank you.
I LOVE your videos man! I'm getting comfortable with web technologies and your channel is really helping. Thanks for the videos! A request if you ever find time... Joomla as a Framework (not CMS)! Thanks again!
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
Thanks so much for this tutorial, I was wondering how to work on connected tables, I am building an exam app where there will be table for type of exam and questions related to that specific exam type, how do I make this kind of connection.. thanks so much for the video 🙌
when I run this bit of code that you showed... if the result is empty. I get a application crash. the error is not being trapped. db.query(sql, function (err, results) { if (err) { console.log('Error:' + err.stack); return; } it was if (err) throw err; I don't want to just throw it I want to continue on with the else block.... not shown. What am I doing wrong?
I'm having issues with the user and pasw. I tried different things I found online but I still dont get the page shown. What is the user and pasw Im supposed to use?
Let's say I put the db.connect() inside an app.get('/connectdb').The first time I run the nodemon and hit the URL localhost:`port'`/connectdb. Node js connected to db. But I make some changes to the file and save it. Now nodemon restarts. This time, even though I didn't hit localhost:`port'`/connectdb, nodejs-mysql connection was still intact. Why? Doesn't nodemon restarting the application mean everything goes back to the initial stage?
I've gone through dozens of videos on this topic, I was finally able to get this going through this; you're very clear and concise. I mean, thanks to all the others for adding to my knowledge base, but it goes a long way to create a video where someone who can speak clearly and knows what they are doing, without wasting time.
Thank you.
This is exactly what I think every time I want to learn something new. Brad is one of the few that is genuine, not overly and grossly enthusiastic, explains clearly, and is even funny at times which helps ease the learning process. He has a natural ability to make learning fun in this category.
True
3 hours spend looking for an example of adding parameters at request, finally an example that works, really helpful
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
Guys I apologize for the out of sync mini-cam toward the middle/end. I'm working on fixing that in my recording software. Hope you enjoy the video!!
Hi Brad, thanks for this video. I have a request in countinuation this video. I would be more than happy to pay for that course. A detailed course on Sequilize ORM for Node teaching basics of Sequilize and also Database Design using Sequilize. There are not much great resources on it and it would be great to have a course from you. Please consider this once :-)
just came here to press a like, u deserve it man :) good job
I will most likely do a youtube video but I am also considering a node.js course with a detailed project using sequelize
Thank you bud :)
Thanks
00:00 Intro
01:40 Install XAMPP
03:09 Create app & Install dependencies
07:03 Create connection
08:12 Connect to MySql
09:30 Create database
12:36 Create table posts
16:56 Insert data to posts
19:58 Select posts
21:10 Select single post
23:05 Update post
24:55 Delete post
Thank you Brad. Why is it that you seem to be the only guy on the internet who can explain things so that they're easy to understand, easy to implement and don't waste your time? You helped me so much (with your Udemy courses and TH-cam videos) I cannot thank you enough. You rock :)
no words for traversy media i cant imagine that much information in this duration very clearly explained hats off man from india
Was just building an express mysql2 api just for fun to practice and forgot how to use "?" for escape characters in queries to prevent sql injection. Fast forwarded to 17:30 and got my answer. Thanks TraversyMedia. I am now a professional web dev working on a contract with the DoD and your TH-cam channel really helped me to become the web developer that I am today.
i regret not learning node backend development a few years ago, and sticked with laravel and codeigniter as the companies i was working for had projects in those. Thank you for this Brad. Your NodeJS Tutorials are very easy to get and understand. Thank You.
Every time I see this Traversy Media intro I know something good is coming...
Great video. I was coming from mssql and had to find this specific video on how to link node.js with MySQL. Spot on. Thanks for the video, really helpful and well executed. Simple and easy, no messing around.
this is some of the channel on which i don't skip ads...for now this is the best i can do to help this channel. and i am commenting while that long ass ad is playing. :)
That's plenty. Thank you. I know ads really suck. I do the same thing though for all the creators I watch and enjoy. Especially if you are really liking the content and you just want to hurry up and skip. People like you are the reason I do this, it shows your appreciation and boosts my drive to create more free content :)
Thanks Brad for consistently delivering awesome tutorials that are precise, packed with tons of meat and no fluff. Great stuff bruv
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
I tried your video using mamp.
At first I couldn't access the db, but in the case of the mamp I changed the password to 'root' and it worked. I learned a lot.Thanks from Japan.
You are the best web development teacher on TH-cam. Thank You Sir
Great video. all of the code works fine. It's Still relevant in 2023!
I was working on a project and was about to give up and this guy just made me not to.
Thanks bro
Such a chill, to the point tutorial... absolutely brilliant, lots of love from confused front-end devs
Very good tutorial. Some updates(2022) would be to use mysql2 instead of mysql, and to add a port (usually 8889) if you are using MAMP. Thank you Brad
I'm learning a lot of English and a lot of web development with this video. This was very useful, thanks a lot.
Really straightforward and clear from the beginning! Thank you for doing this video
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
Looked everywhere for something simplified...you made it much easier..thumbs up!
Congratulations, man. I am from Brazil and I love your tutorials.
don't know why people are using mongodb or postgre sql in tutorial of nodejs with expression.
this tutorial simply show how to connect with database (mysql). it is very very helpful.
thanks a lot.
Oh what an introduction. To be frank, I was almost giving up but this made my learning seamless and easy. I can now CRUD using node. Thanks
Those who are getting "ER_NOT_SUPPORTED_AUTH_MODE" error in the DB connection, try the newer NPM package "mysql2". It supports advanced authentication that MySQL 8.0 requires.
Here's the NPM page link: www.npmjs.com/package/mysql2
Thanks!
thanks a bunch🙏
This is really good. You know it oops at number one on the search... You really need to make an update on this... Its been six years now... You know many things must have changed overtime
Dude, I’m a beginner but I love these videos. Big shoutout to the person for not blasting me out with intro music too’
finally have found the best explanation. And get the code too so i dont have to rewrite everything. Thanks
This is the most helpful and easy-to-understand video. Thanks, brad.
Thanks for helping me with my web programming homework, hugs from Brazil!
One of the few channels i have subscribed
Love the practical nature of your videos.
Thank you man, you made me believe I can still do it..!
Watched a few videos and this is definitely the best and easiest to understand and follow
Okay, so after a long day and a half, here's what I did to get this working. Hoping it helps anyone who struggled at it like i did.
First, it's important to have your MySQL configuration set to legacy for password values as the connection from node kept throwing an error due to protocol mismatch. Once i reconfigured MySQL to the legacy, it finally connected.
He doesn't cover installing Bash, so do an npm install bash after you install Terminal, then click the plus sign on the terminal to get the bash terminal.
Once you do these things, following this tutorial is easy and does what it is supposed to do. Thank you
Wow, very informative, thanks! I watched this video to see if it would show me what I need to begin building a project, and it gives me what I need *and more*, so I'll definitely be rewatching.
I really liked this. I always refers to this MAN's videos ( Traversy Media) for Node, MySQL , Mongo..etc....
I have had problems with the update because of the ID of my table data, thanks 4 explaining it clearly 👌
Is the SET ? syntax a part of MySQL itself? Or is that something that is part of the Node MySQL libary?
Every project I can think of you have a video for thank so much for your hard work
In ES6, when you have one function parameter, you can delete the parentheses which makes the code cleaner in my opinion :)
db.connect( err => {
if (err) { throw err }
});
will still work.
Though one could argue that the parentheses shows clearly that it's a group of arguments, also it you want to use rest operator then you need to add parentheses.
Sometimes you have to think how does it look to someone who's never seen your code and how easy is it to reason about your program.
But I also prefer the cleaner look, but just wanted to show a reason why keeping it might be better, at-least if you are working within a team.
It does kinda throw me a bit when there is no parenthesis around the argument, no pun intended!
Thank you so much for your video. It was really helpful for me. I was having hard time in a web project. then your video saved my life.
24:30 - line 87 - that's a nice candidate for SQL injection :)
He is concatenating SQL query with string he receives from user request. So if user in that requests sends malicious SQL query it will get executed. This vulnerability basically allows you (as a hacker) to do anything with target database.
Fortunately you may use "Escaping query values": github.com/mysqljs/mysql#escaping-query-values
So in this case the query may look like this: let sql = 'UPDATE posts SET title = ' + connection.escape(newTitle) + ' WHERE id = ' + connection.escape(req.params.id) +';
thank you
Use parameterized query. blogs.msdn.microsoft.com/sqlphp/2008/09/30/how-and-why-to-use-parameterized-queries/
maybe better look like this:
let sql = 'update posts set title='+ db.escape(newTitle) +' where id='+ db.escape(req.params.id) + '';
Do you have any examples about shopping cart on nodeJs and mysql?
This is such an odd way to do it, but I get that you're trying to teach the concept.
Awesome stuff.
Thank you Brad :)
Awesome!! Easy to understand, clear, and the best intro to understanding Node with mysql. thanks alot!!
To be honest you helped me understand express framework!!! Well done!!!
You are really awesome bro ❤
Always you are my guru
Laravel and node I have learned from you 😍
finally this is the one ive been waiting for
Keep getting tthis error:
```
Error: connect ECONNREFUSED 127.0.0.1:3307
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
```
Any ideas?
Thanks Brad! Very helpful. One thing I really don't understand is the adding post part from min 17:40. Why is this hard coded and not dynamically added through postman or the url input field? Anyone an answer? Thanks a lot!
You explain these things well. Thank you very much.
This is really very helpful I learned it so fast bcoz you taught it so well❤️❤️
Thank you so much! This was a hugely helpful tutorial. Keep up the great work!
good content brad really enjoy your crash courses and your series thank alot brad
Thank You So Much Man as a Newbie this Video Changed my Life, Lots of Love Bro
Lots of thanks for providing such a good content :)
Thanks alot. This was exactly what I was looking for!
Travis why are you using app.get to post instead of app.post? and to update you use get instead of put? and last thing, should not be better to use the "?" in the update to avoid sql injection?
Basically, the reason for the get is because my goal of the video was to display how the MySQL driver works. I guess I kind of guessed that if people are using node they know not to do this but I probably should have mentioned it if I didn't.
Oh, yes you are right, i was only saying that just cause maybe you missed, or maybe you did it for a specific reason.
your right this does display how the mysql driver doesnt really care about the type of request it is getting and mysql is not complaining when its getting the actual code in sql. but i would mention it when there is and actual user interface and the request is coming from a form.
Great!, i just got into node js and this is a good start for me . Thank you
Really great video! I've twisted the code a little bit to send the results of the query to the screen like 'res.send(results)' for a better development experience! Thanks a lot
I am using MAMP (not pro) and I had a hard time tracing the cause the error it was giving me when db.connect( ) runs. The solution I found was to enter the following argument into createConnection( ) :
port: '/Applications/MAMP/tmp/mysql/mysql.sock',
Hope this helps somebody!
Also, Traversy, once beautifully concise video as always!
thats a socket not a port
This video is still very useful!
Thank youuuu ! couldn't figure how to show the output in my browser from MySQL/Node. Thanks a lot!!!
excatly what needed for my DBMS project ✍
11:00 when i use a password, i get an error. Removing the pw removes the error. Any ideas? ty!
code: 'ER_ACCESS_DENIED_ERROR',
errno: 1045,
sqlMessage: "Access denied for user 'root'@'localhost' (using password: YES)",
sqlState: '28000',
fatal: true
did you resolve the errror? im getting the same
@@leviackerman9882 i removed the password property from the db constant @ 11:34
@@kite4792 thanks it worked, but is it secure?
Very clean and quick guide, thank you!
Whats the point of putting the query in a variable? doesn't seem to be used for anything? let query = db.query(sql, (err, result)=>{ }); at 18:16in the video. What am I missing?
This was extremely helpful. Thanks for the tutorial.
Thanks alot I'm from Iraq I'm follow your courses is the best continues
Thanks man, that's awesome I'm able to help people all around the globe :)
Nosql is so fun. Sql needs so much structuring beforehand
Thanks a lot Brad, exactly what i was looking for. You are Super !
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
Nice tutorial your awesome but I have a question what is difference between using sequelize and mysql
Thank you for sharing your code...saved me a bout an hour of fiddling now I can just use it to teach my boss :D
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
@@apurv5847 did you find out mate?
@@hyperxjourney5837 Yeah thanks bro. I solved it. The problem was that when the program couldn't find anything in database the value coming back was null. So just used an if else statement and the problem was solved.
11:52 It says database created but it won't show up in phpmyadmin through xampp. also I know it got created because if I try again it tells me that the database already exists.
You probably tried this but... did you remember to hit the little refresh button above the database list on the left in phpmyadmin?
Hi, I have the exact same problem. Did you manage to fix it? If you did, how did you fix it? Thank you :)
Гоуем си, брат! (You are big one, brother (брат == brother, Brad is similar to Брат and sounds the same in my language - Bulgarian :) ) You are the best, really! Bless you! Have a great and lovely new year!
Thank you Brad this is what i m waiting for
Brad, thanks so much for this video. It really helped me understand things easier.
you are awesome sir your all videos always very helpful thank you
Nice tutorial! Easy to understand & implement! Thank you!
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
Good tuitorial , do you have any examples on Oracle with Node js
For ones who had problem connecting with db, around 11:30, password could be just empty string instead of 123456
Well explained, nice tutorial. I just have one question, aren't we supposed to use app.delete when we are making delete query instead of app.get? Same goes for app.put or app.patch on update query instead of app.get.
Yes. I think he overlooked this because it is more an SQL tutorial rather than a REST api tutorial.
Thanks, Travisscott Media!
Excellent video, Brad.
I have a question. What does the query return?
I see RowDataPacket. But what is that? A list of objects? List of lists?
Thank you.
A list of objects.
its one thing to run XAMPP and use mysql but how would you use mysql on the google cloud platform for your app or webpage?
Apologies for the next question, can you share build script to build a Prod release for this project just like it is?
CREATE DATABASE IF NOT EXISTS will be more suitable example if the task is to create db from code
I LOVE your videos man! I'm getting comfortable with web technologies and your channel is really helping. Thanks for the videos! A request if you ever find time... Joomla as a Framework (not CMS)! Thanks again!
Hi and thank you for your awesome video tutorials, you are one of my most favourite tutors :)
+1
I need a help. So I made a login page which works fine when input is correct. But in case if the input goes wrong like either the password or username, it throws error and the server crashes. I don't want that. Instead I want that error to be handled someway but I ain't able to find any way. Please help me with this. I'd really appreciate if you can please.
Hey Brad, Can you please share your work desk photos? I would love to have a look please. Also do you prefer desktop or laptop?
Thanks so much for this tutorial, I was wondering how to work on connected tables, I am building an exam app where there will be table for type of exam and questions related to that specific exam type, how do I make this kind of connection.. thanks so much for the video 🙌
This was extremely helpful, thank you! Keep up the great work.
when I run this bit of code that you showed... if the result is empty. I get a application crash. the error is not being trapped.
db.query(sql, function (err, results) {
if (err) {
console.log('Error:' + err.stack);
return;
}
it was if (err) throw err; I don't want to just throw it I want to continue on with the else block.... not shown.
What am I doing wrong?
LEGEND !! GOT ME MY JOB!
I have a question. Does the npm 'mysql' module (used with nodeJS) able to execute ALL of the MySql features ?
it was a nice tutorial. Just a question that if i want to use pre install mysql on my system, will node js be able to connect to that.
I'm having issues with the user and pasw. I tried different things I found online but I still dont get the page shown. What is the user and pasw Im supposed to use?
Thank you Brad for this tutorial
Let's say I put the db.connect() inside an app.get('/connectdb').The first time I run the nodemon and hit the URL localhost:`port'`/connectdb. Node js connected to db. But I make some changes to the file and save it. Now nodemon restarts. This time, even though I didn't hit localhost:`port'`/connectdb, nodejs-mysql connection was still intact. Why? Doesn't nodemon restarting the application mean everything goes back to the initial stage?