|
|
|
|
@ -14,6 +14,10 @@ const mysqlConnection = mysql.createConnection({
|
|
|
|
|
});
|
|
|
|
|
mysqlConnection.connect()
|
|
|
|
|
|
|
|
|
|
app.get('/songs', async (req, res)=>{
|
|
|
|
|
const results = await mysqlConnection.awaitQuery("SELECT * FROM songs WHERE learned=True ORDER BY title ASC");
|
|
|
|
|
res.json(results)
|
|
|
|
|
})
|
|
|
|
|
app.get('/instruments', async (req, res)=>{
|
|
|
|
|
const results = await mysqlConnection.awaitQuery("SELECT * FROM instruments");
|
|
|
|
|
res.json(results)
|
|
|
|
|
|