Now that we have our database module ready, it's time to use the functionality we just created and update our existing modules to make use of this persistence.
Integrating the database module into our server application
Upgrading the sensor interface module
The functionality defined in get-cached-sensor-readings.js was defined to fetch readings from our sensor and return it via a callback function. Now that we have our database in place, we want to store the readings in addition to returning them:
const getSensorReadings = require('./get-sensor-readings') /** * Import the database module that we created earlier */ const databaseOperations = require('./database-
operations&apos...