+ 1
What backend can i use with nodejs?
I started coding here at sololearn and got all the basics in html, css, javascript, jquery, sql and php. Then, i started querying mysql db with php 9n apache server and all went well. I was able to build projects with angularjs, bootstrap and plain php. But recently, i switched to using nodejs and realized i can't use apache server beacuse it couldn't run php. Help guys. How can u get to a database using nodejs?
1 Answer
+ 3
To access a MySQL database with Node.js, you need a MySQL driver.
See these two links you will find what you search for:
1. https://www.w3schools.com/nodejs/nodejs_mysql.asp
2. https://www.sitepoint.com/using-node-mysql-javascript-client/
3. With script: https://www.a2hosting.com/kb/developer-corner/mysql/connecting-to-mysql-using-node-js