-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.js
More file actions
42 lines (35 loc) · 1.14 KB
/
database.js
File metadata and controls
42 lines (35 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// import mysql from 'mysql';
// import express from 'express';
// import bodyParser from 'body-parser';
// var sunday_mics = express();
// sunday_mics.use(bodyParser.json())
// pool.query(`select * from monday_mics`, (err, result, fields) =>{
// if(err){
// return console.log(err);
// }
// return result;
// res.send(result);
// });
// mysqlConnection.connect((err)=> {
// if(!err)
// console.log('Connection Established Successfully');
// else
// console.log('Connection Failed!'+ JSON.stringify(err,undefined,2));
// });
// sunday_mics.get('/sunday' , (req, res) => {
// mysqlConnection.query('SELECT * FROM sunday', (err, rows, fields) => {
// if (!err)
// res.send(rows);
// else
// console.log(err);
// })
// });
// sunday_mics.get('/sunday/manhattan' , (req, res) => {
// mysqlConnection.query('SELECT * FROM sunday WHERE borough = "Manhattan"', (err, rows, fields) => {
// if (!err)
// res.send(rows);
// else
// console.log(err);
// })
// });
// export default sunday_mics;