Since the application process is not a part of the deployed Firebase application that we built in the previous chapter, we will create a new folder for it (for this chapter, it will be named firebase-process).
First, we will be copying over the get-sensor-readings.js module from the previous implementations (shown here for reference):
var sensor = require('node-dht-sensor') const getSensorReadings = (callback) => { sensor.read(11, 4, function (err, temperature,
humidity) { if (err) { return callback(err) } callback(null, temperature, humidity) }) } module.exports = getSensorReadings
Next, we implement the core module:
/** * Import the "get-sensor-readings" module, as well as
the firebase admin module */ const getSensorReadings =...