Adding persistence gives us a very small end result even though there is a lot going on under the hood. Now is the best time to make use of the power we have with SQLite to add more features to our application.
Adding new features - the ability to view readings from a custom time period
Adding the required APIs
Just like in the previous section, we will need to start by adding the APIs to get the readings and their average for a certain time period:
app.get('/temperature/range', function (req, res) { /** * Here, the "start" and "end" datetimes for the range
of readings are * expected to be received through the query parameters.
This is spllied as part * of...