New SQL def & added code example to read from SQL
This commit is contained in:
@@ -33,6 +33,16 @@ try {
|
||||
var links = require('../src/links.json');
|
||||
}
|
||||
|
||||
// WIP learning to read from DB
|
||||
con.connect(function(err) {
|
||||
if (err) throw err;
|
||||
console.log("Connected!");
|
||||
con.query(sql, function (err, result) {
|
||||
if (err) throw err;
|
||||
console.log("Result: " + result);
|
||||
});
|
||||
});
|
||||
|
||||
//Read personal data
|
||||
try {
|
||||
var personaldata = require('../src/personaldata.json');
|
||||
|
||||
Reference in New Issue
Block a user