Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS for transformation from Signin Page to Signup page #6

Open
ayush0801 opened this issue Oct 1, 2023 · 7 comments
Open

CSS for transformation from Signin Page to Signup page #6

ayush0801 opened this issue Oct 1, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@ayush0801
Copy link
Owner

A transformation or some enhancement to be added while switching from the Login Page to the Create Account page.

@ayush0801 ayush0801 added enhancement New feature or request good first issue Good for newcomers hacktoberfest labels Oct 1, 2023
@mhamzanadeem
Copy link

@ayush0801 can you assign this issue to me ? i am participating in hacktoberfest 2023

@mhamzanadeem
Copy link

@ayush0801 As i am new to Mongodb , Can u help me out ?

I have make account on mongodb , so what to do
how to make .env file (as you have mentioned in readme file )

@ayush0801
Copy link
Owner Author

Setting Up MongoDB and Creating the .env File

In the "Beyond Classroom" project, MongoDB is used as the database to store data. Follow these steps to set up MongoDB and create the necessary .env file.

Setting Up MongoDB

  1. Sign In to MongoDB Atlas:

  2. Create a Cluster:

    • After signing in, you'll be taken to your MongoDB Atlas dashboard.
    • Click the "Build a Cluster" button to create a new cluster.
    • Follow the on-screen instructions to configure your cluster. You can usually go with the default settings for development purposes.
    • It may take a few minutes for MongoDB to set up your cluster.
  3. Add IP Whitelist Entry:

    • In the MongoDB Atlas dashboard, go to "Network Access" from the sidebar.
    • Click the "Add IP Address" button.
    • You can add your current IP address to allow your computer to connect to the database.
    • You can also allow access from any IP (not recommended for production).
  4. Create a Database User:

    • In the MongoDB Atlas dashboard, go to "Database Access" from the sidebar.
    • Click the "Add New Database User" button.
    • Create a new user with a username and password. Remember these credentials; you will need them later to connect to the database.
    • Assign appropriate database user privileges. For development purposes, you can grant the user the "Atlas Admin" role.
  5. Connect to Your Cluster:

    • In the MongoDB Atlas dashboard, go to "Clusters" from the sidebar.
    • Click on your cluster name.
    • On the cluster details page, click the "Connect" button.
    • Choose the connection method "Connect Your Application."
    • Copy the connection string, which includes placeholders for your username and password.

Creating the .env File

  1. Create a .env File:

    • In your project directory, create a new file named .env. You can use a text editor or run touch .env in your terminal.
  2. Add MongoDB Connection String:

    • Open the .env file in a text editor.
    • Add the MongoDB connection string you copied earlier from MongoDB Atlas to the .env file. Replace <username> and <password> with the credentials you created in MongoDB Atlas.
MONGODB_URI=mongodb+srv://<username>:<password>@clustername.mongodb.net/<database>

Replace <clustername> with the actual name of your cluster and <database> with the name of the MongoDB database you want to use for your project.

  1. Save the .env File:
  • Save the changes to the .env file.

Now, your project should be able to access the MongoDB database using the connection string stored in the .env file. Make sure to keep your .env file secure and do not share it publicly, as it contains sensitive information (your database credentials).

@mhamzanadeem
Copy link

@ayush0801
9797

is my vs code stuck ??
why it is not showing me "https :\ localhost300"

@ayush0801
Copy link
Owner Author

There are a few things you can do to try to resolve the "MongoServerError: bad auth: Authentication failed" error in Node.js:

  1. Make sure that you are using the correct username and password for your MongoDB database. You can verify this by checking the MongoDB documentation or by contacting your MongoDB administrator.
  2. Make sure that the MongoDB database is running and accessible. You can check this by trying to connect to the database using a MongoDB client such as MongoDB Compass.
  3. Make sure that the MongoDB database user has the necessary permissions to connect to the database. You can check this by using the MongoDB Compass client to view the user's permissions.
  4. Make sure that the MongoDB database connection string is correct. The connection string should include the following information:
    • The hostname or IP address of the MongoDB server
    • The port number of the MongoDB server
    • The name of the MongoDB database
    • The username and password for the MongoDB database user

If you have verified all of the above and you are still getting the "MongoServerError: bad auth: Authentication failed" error, you can try the following:

  • Restart the Node.js application.
  • Restart the MongoDB database.
  • Clear the Node.js cache.
  • Update the MongoDB driver to the latest version.

If you are still having trouble connecting to your MongoDB database, you can contact MongoDB support for assistance.

Here are some additional tips for resolving the "MongoServerError: bad auth: Authentication failed" error:

  • Make sure that you are using the correct password for the MongoDB database user. The password is case-sensitive and should not contain any spaces.
  • If you are using a special character in your password, such as an exclamation point or an asterisk, you may need to encode it before using it in the MongoDB connection string.
  • Make sure that you are using the correct MongoDB authentication method. The default authentication method is SCRAM. If you are using a different authentication method, you will need to specify it in the MongoDB connection string.
  • If you are using MongoDB Atlas, make sure that you have enabled network access for your MongoDB database user.

@mhamzanadeem
Copy link

@ayush0801
77777
can u help me what i am doing wrong . my vs code is connected to mongodb atlas . still i can't open website

@mhamzanadeem
Copy link

@ayush0801 77777 can u help me what i am doing wrong . my vs code is connected to mongodb atlas . still i can't open website

@ayush0801 can u help me out ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants