select: 1개의 글
[NodeJs] MySQL 연동하기 (SELECT/INSERT/UPDATE/DELETE)
MySQL 모듈 npm install mysql require('mysql') MySQL Connection var mysql = require('mysql'); var conn = mysql.createConnection({ host: 'localhost', user : 'root', password : 'admin', database : 'test' }); conn.connect(function(err){ if(err){ console.log(err); }else{ console.log('mysql connected.'); } }); SELECT conn.query('SELECT * FROM BOARD', function(err, results, fields){ //console.log(argumen..
JavaScript BackEnd/Node.js, Express
2021. 4. 30. 01:55