Created
June 8, 2017 20:27
-
-
Save Kamilnaja/103e2857f3ee9a396a88a01a1aa1315d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get('/texts', function (req, res) { | |
connection.query('SELECT * FROM texts', function (error, results, fields) { | |
if (error) throw error; | |
return res.send({error: false, data: results, message: 'Texts list'}) | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment