Skip to content

Conversation

@Abhishek-surya
Copy link

Title: Configure Project to Use MongoDB for Data Storage

Description:
This PR configures the project to use MongoDB as its primary database to store user and other application-related data. It sets up database interaction using Mongoose.

Changes Include:

  • Installed and configured mongoose for MongoDB interaction.
  • Established a connection to MongoDB using mongoose.connect().
  • Created a basic User schema to store user-related data.
  • Implemented basic CRUD operations for user management.

Steps to Implement:

  1. Install Mongoose: pip install pymongo.
  2. Configure the connection using mongoose.connect() with the appropriate MongoDB URI.
  3. Define a User schema of videos.
  4. Implement methods for creating and retrieving user data.
  5. Test database connectivity and data persistence.

Expected Outcome:

  • MongoDB is successfully connected.
  • User data is stored correctly in the database.

How to Test:

  1. Ensure MongoDB is running locally or use a cloud-hosted MongoDB URI.
  2. Run the application and verify that the database connection is established.
  3. Use API requests or a test script to create and fetch user data.
  4. Confirm data is stored correctly in the MongoDB collection.

There is no data available to fetch, but the connection is established.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant