diff --git a/server.js b/server.js index 79f91df..9fb5d2d 100644 --- a/server.js +++ b/server.js @@ -86,7 +86,10 @@ app.get('/getdata', (req, res) => { */ Readings.findAll({ - attributes: ['timestamp', 'reading'] + attributes: ['timestamp', 'reading'], + order: [ + ['timestamp', 'DESC'] + ] }).then((result) => { res.status(200).send(result).end(); })