From ddb49976bb0602619442182bd0db0c8f0f380b6c Mon Sep 17 00:00:00 2001 From: Olu Ameye Date: Tue, 24 Aug 2021 04:18:32 +0000 Subject: [PATCH] fix --- index.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 5e57a6a..52a60bb 100644 --- a/index.js +++ b/index.js @@ -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' }, - { id: 2, description: 'Basic Encounter',price: '100.00',currency : 'NG', provider_id : '1' }, - { id: 3, description: 'Detail Review',price: '2000.02',currency : 'NG', provider_id : '1' }, - { id: 4, description: 'Second Opinion',price: '5000.00',currency : 'NG', provider_id : '1' }, -]; + +var con = mysql.createConnection({ + host: "10.10.33.60", // ip address of server running mysql + user: "wroot", // user name to your mysql database + password: "wroot@#Chi3fW0rks.52", // corresponding password + database: "blog_mermsemr_com" // use this database to querying context + }); + app.get('/', function (req, res) { @@ -69,7 +71,7 @@ app.get('/', function (req, res) { if (err) throw err; // if there is no error, you have the result console.log(result); - res.status(200).send( [{payload: result}]); + res.status(200).json( [{payload: result}]); }); })