A simple full-stack web application for user registration and login using Node.js and MongoDB.
- Required Material and Installation
- Recommended Code Editors
- Specifications
- Key Functions
- MongoDB
- Detailed Guideline/Client Requirements
- Setting Up and Running the Project
- How to Install MongoDB and Connect MongoDB Compass to Localhost
- License
To run this project, you will need the following:
While you can use any code editor of your choice, the following editors are commonly used and supported for this project:
This application allows users to register and login to a website. It is implemented using Node.js and MongoDB.
- Allow users to register on the website.
- Display a form to capture users' information.
- Users enter a username and password.
- Login credentials are saved to the MongoDB Database.
- Allow users to log in to the website.
- Display a form for users to enter their credentials.
- Users enter their username and password.
- Login credentials are matched with the ones saved in MongoDB.
- Users will receive a message indicating whether the login was successful or not.
The project uses MongoDB as the database to store user data.
- Users can choose either to register or login on the main page.
- On the register page, users enter their username and password and click the submit button to save their information to the database.
- Registration information is saved to the database.
- On the login page, users enter their username and password and click submit to log in.
- If the login credentials are correct, users receive a login successful message.
- If the login credentials are incorrect, users receive a login failure message.
- Links to the main page, login page, and register page are available on different pages.
Follow these steps to set up and run the project:
-
Clone the repository:
git clone https://github.com/centaurmontano/register-login-system.git
-
Install dependencies: cd your-repository npm install
-
Start the application npm start
Follow these steps to install MongoDB and connect MongoDB Compass to localhost:
-
Download and Install MongoDB Community Server:
- Visit the MongoDB Community Server download page and download the appropriate version for your operating system.
- Follow the installation instructions provided for your OS.
-
Open Command Prompt (CMD):
- Open the Command Prompt on your computer.
-
Navigate to MongoDB Bin Directory:
- Copy the path of the bin folder in the MongoDB installation directory.
- Use the
cd
command to navigate to the bin directory in the Command Prompt. For example:cd C:\Program Files\MongoDB\Server\{version}\bin
-
Start MongoDB Server:
- In the Command Prompt, type the following command to start the MongoDB server:
mongod
- In the Command Prompt, type the following command to start the MongoDB server:
-
Open MongoDB Compass:
- Launch MongoDB Compass on your computer.
-
Connect to Localhost:
- In MongoDB Compass, you should see the Connect screen.
- For the "Hostname" field, enter
localhost
. - For the "Port" field, enter
27017
. - Click the "Connect" button.
-
Verify Connection:
- MongoDB Compass should connect to the local MongoDB server, and you will see the admin, config, and local databases.
- The connection string should be similar to
mongodb://localhost:27017
.
Now you have successfully installed MongoDB and connected MongoDB Compass to localhost. You can use this local MongoDB server for your project.
Make sure to customize the instructions based on your specific needs and provide any additional information that might be relevant for your users.
This project is licensed under the MIT License - see the file for details.