This commit is contained in:
Olu Ameye
2021-08-24 04:18:32 +00:00
parent 7a247c029e
commit ddb49976bb
+9 -7
View File
@@ -47,12 +47,14 @@ GRANT ALL PRIVILEGES ON blog_mermsemr_com.* TO 'wroot'@'10.0.0.52';
*/ */
const price_list = [
{ id: 1, description: 'Free',price: '0.00',currency : 'NG', provider_id : '1' }, var con = mysql.createConnection({
{ id: 2, description: 'Basic Encounter',price: '100.00',currency : 'NG', provider_id : '1' }, host: "10.10.33.60", // ip address of server running mysql
{ id: 3, description: 'Detail Review',price: '2000.02',currency : 'NG', provider_id : '1' }, user: "wroot", // user name to your mysql database
{ id: 4, description: 'Second Opinion',price: '5000.00',currency : 'NG', provider_id : '1' }, password: "wroot@#Chi3fW0rks.52", // corresponding password
]; database: "blog_mermsemr_com" // use this database to querying context
});
app.get('/', function (req, res) { app.get('/', function (req, res) {
@@ -69,7 +71,7 @@ app.get('/', function (req, res) {
if (err) throw err; if (err) throw err;
// if there is no error, you have the result // if there is no error, you have the result
console.log(result); console.log(result);
res.status(200).send( [{payload: result}]); res.status(200).json( [{payload: result}]);
}); });
}) })