fetchNoticeList.js
399 Bytes
const mysql = require("mysql");
var noticeList = async function(req,res){
var connection = mysql.createConnection({
host: "34.69.247.0",
user: 'root',
password: 'kcss3711',
database: 'khuNotice'
});
connection.connect();
connection.query(req.body.sql,function(err,rows){
if(err){
console.log(err);
}
res.send(rows);
})
}
module.exports = noticeList;