Questions tagged [mongodb-atlas]

MongoDB Atlas stands out as an exceptional cloud-based database solution tailored for seamlessly running, monitoring, and upkeeping MongoDB deployments. The service goes beyond ordinary expectations by offering the deployment of exclusive servers exclusively catering to MongoDB instances.

The cPanel Node.js application is experiencing difficulties connecting to the MongoDB Atlas cluster, yet it functions without any issues on

Having developed a website using Node.js with MongoDB Atlas as the database, I encountered no issues while testing it on Heroku. However, after purchasing my domain and switching to proper hosting, I faced challenges. I attempted to set up my website by c ...

I am encountering a CORS error when trying to fetch data from the MongoDB Atlas Data API. What might be the reason for

please provide proper image description I am encountering a CORS error when trying to fetch data from the MongoDB Atlas API. Interestingly, the request works without any issue in Postman and Thunderclient. ...

While trying to post data in MongoDB Atlas using Node.js (Express), I encountered an error message stating UnknownReplWriteConcern

Encountering an issue when attempting to post data in MongoDB atlas. const express = require('express'); const router = express.Router(); const Persons = require('./PersonsSchema'); router.post('/',async(req,res)=>{ console.log(req.body.Name); ...

Utilizing Mongoose to fetch data from Atlas MongoDB for integration into an Angular application

I recently made some updates to my signup page by adding a new input field for the user's name and adjusting the schema settings accordingly. How can I now retrieve this name to use in both my post-list component and post-create component? Here is an exam ...

Explore various queries and paths within MongoDB Atlas Search

I am currently working on developing an API that can return search results based on multiple parameters. So far, I have been able to successfully query one parameter. For example, here is a sample URL: http://localhost:3000/api/search?term=javascript& ...

Can you identify the issue in the syntax I'm using to establish a connection to MongoDB Atlas clusters?

const express = require('express'); const bodyParser = require('body-parser'); const mongodb = require('mongodb'); const mongoose = require('mongoose'); const dbPath = "mongodb+srv://<Admin>:<615d5846c>@cluster0-4gelt.mongodb.net/test?retryWrit ...

When attempting to establish a connection with MongoClient, the function fails gracefully without generating an error

try { if (!conn) { console.log("Attempting to Connect to Atlas"); conn = await MongoClient.connect(process.env.MONGO_URL, { useNewUrlParser: true, useUnifiedTopology: true, }); console.log("Success ...

While attempting to send data to mongodb, I encountered the 'MongoNotConnectedError' and had trouble proceeding

Even though I am able to retrieve the products when I log the const products variable, I am encountering issues when attempting to insert data into my MongoDB database. The error message states that mongoClient is not connected. const express = require("ex ...

What are the best practices for adding images to mongoDB Atlas using multer?

I am working towards the goal of uploading images to MongoDB Atlas using Multer. Currently, I have an example set up with express-generator, which includes the following relevant files: app.js: // ... var app = express(); //Set up mongoose connection va ...

What is the best way to ensure that MongoDB Node JS uses Int32 - Int64 instead of Double?

Is there a way to save integer values as int32 or int64 in my Atlas Trigger (NodeJS code)? Currently, when I save any value, it is saved as a Double instead. user_collection.updateOne({"_id": "anyID"}, {$inc: {"score": 2}}); ...

Guide on sending an http request using Atlas Trigger in a NodeJS environment

I am working with a simple MongoDB Atlas trigger in NodeJS: exports = function(changeEvent) { // Implementing an HTTP request }; The main objective is to invoke an AWS lambda function from this trigger. Therefore, I am seeking guidance on the synta ...

The connection string generated by the atlas cluster through terraform is not properly formatted

When using Terraform to create an Atlas cluster, the output I am receiving is incomplete for my request. Terraform is providing me with: mongodb+srv://esc-app-dbcluster-devel.b59mwv7.mongodb.net However, what I actually need is more along the lines of: ...

I am currently experiencing an issue where my MongoDB database connection does not automatically reopen after being

I've been working on setting up an Authentication system using NextAuth in my Next.js app. I decided to use NextAuth Credentials as the provider along with a custom login screen. Currently, I am utilizing NextAuth v.4 for this setup. In the past, I estab ...

The application successfully establishes a connection with the local MongoDB, but unfortunately, encounters session creation issues upon deployment to the Heroku server

This is my first time deploying an app, and I'm facing a particular issue. When hosting the app locally, I can use mongo (via Atlas) without any problems. Users are created on sign up, and they have a session. However, when I deploy the code to Heroku (us ...