Skip to content

ReFo0/nodejs-mysql-login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js MySQL Login Application

This simple Node.js application allows a user to sign up and log in. User credentials are stored in a MySQL database.

Installation

  1. First, clone this project:

    git clone <repository_url>
  2. Change directory:

    cd nodejs-mysql-login
  3. Install the required packages:

    npm install express mysql body-parser
  4. Set up your MySQL database and create a database. Then create a database named loginpage.

  5. Update your MySQL connection details in the index.js file:

    const db = mysql.createConnection({
        host: 'localhost',
        user: 'root',
        password: '', // Your MySQL password
        database: 'loginpage'
    });
  6. Start the server:

    node index.js

Usage

  • Once the application is running, you can access the application by going to http://localhost:3000/login.html in your browser.

  • To sign up, visit the "/signup" page and enter the required information.

  • To log in, visit the "/login" page and use the credentials you signed up with.

Photo

image

Video

8gtnoe_1.mp4

License

This project is licensed under the MIT License. See the LICENSE file for more information.