» Home » Applications » Next.js Web App with MongoDB Data

Next.js Web App with MongoDB Data

Next.js Web App with MongoDB Data

Author:

🔗 Elfi309

Real discussions and feedbacks of Next.js Web App with MongoDB Data

🔗 Join the Discussion on Forums

App Description

Hey everyone, beginner here!

I’m pretty new to web development and need some advice on setting up my local development environment for a Next.js web app. Here’s the situation:

  • The app was built by a developer and is hosted on Vercel.
  • It uses MongoDB to store user data (like login credentials).
  • The code is available on GitHub, and I’ve successfully cloned it to my local machine.
  • I can compile and run the app on localhost without issues using Visual Studio.

My problem:
The app starts with a login page, and the credentials I need to use are stored in the online MongoDB database. However, I don’t know how to configure my local app to connect to this database so I can use the test user data for development.

What I’d like to do:

  • Keep working on the app design locally.
  • Still be able to access the online MongoDB database while running the app on localhost.

Questions:

  1. How can I configure my local environment to connect to the remote MongoDB database?
  2. Are there any best practices for setting this up securely (e.g., handling environment variables)?
  3. Is there anything specific I need to adjust in the Next.js or MongoDB setup?

Thanks in advance for any tips or guidance! 😊

Project Overview

The post is a request for advice on setting up a local development environment for a Next.js web application that uses MongoDB for data storage. The author is seeking guidance on connecting the local app to a remote MongoDB database securely and efficiently.

Related Posts

Leave a Reply