skip to Main Content

Mongodb aggregation response

I have a Property controller : //Get Properties By Type const getPropertiesByType = async (req: Request, res: Response) => { const { cities, type } = req.query const citiesArr = typeof cities === 'string' ? cities.split(',') : [] try {…

VIEW QUESTION

Mongodb – new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn))

I have tried to run this code: const connectToMongo = require('./db') const express = require('express') connectToMongo(); const app = express() const port = 3000 // Available Routes app.use('/api/auth', require('./routes/auth')) app.use('/api/notes', require('./routes/notes')) app.listen(port, () => { console.log(`Example app listening on port…

VIEW QUESTION

Node.js & Express web API not working on azure

I have created a basic app with React SPA and Node.js & Express web API using this sample https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/5-AccessControl/1-call-api-roles The app is running fine locally- both front-end authentication and backend API calls are working as expected. When I deploy the…

VIEW QUESTION
Back To Top
Search