I have an array list that contains list of objects. I want to call an API for all the objects in the list get the response and update back the object property. Please let me know what is the best way to handle this scenario. Tried with ForkJoin and For each but before completing all the request in the list, control is returned.
Via Active questions tagged javascript - Stack Overflow https://ift.tt/noNS1P7
I am trying to pull some data from a Postgres database using Node.js and node-postures but I can't figure out why my service isn't connecting. my routes/index.js file: const express = require('express'); const router = express.Router(); const ordersCountController = require('../controllers/ordersCountController'); const ordersController = require('../controllers/ordersController'); const weeklyReportsController = require('../controllers/weeklyReportsController'); router.get('/orders_count', ordersCountController); router.get('/orders', ordersController); router.get('/weekly_reports', weeklyReportsController); module.exports = router; My controllers/weeklyReportsController.js file: const weeklyReportsService = require('../services/weeklyReportsService'); const weeklyReportsController = async (req, res) => { try { const data = await weeklyReportsService; res.json({data}) console...
Comments
Post a Comment