/simpleLogIn-

Primary LanguageJavaScript

simpleLogIn-

Overview

This project implements a simple login page using React for the frontend, Express for the backend, and MySQL as the database. It allows users to log in with their credentials and performs authentication against a MySQL database.

Prerequisites

  • Node.js and npm installed
  • MySQL server installed and running
  • React and Express dependencies installed

Installation

Backend (Express)

  1. Navigate to the server directory: cd server
  2. Install dependencies: npm install
  3. Set up MySQL configuration in server.js
  4. Start the server: node server.js

Frontend (React)

  1. Navigate to the client directory: cd client
  2. Install dependencies: npm install
  3. Start the React app: npm start

MySQL Database

  1. Create a MySQL database named crud
  2. Import the SQL schema from database.sql

Configuration

Update MySQL connection details in server.js:

const db = mysql.createConnection({
    host: "localhost",
    user: "root",
    password: "your_mysql_password",
    database: "crud",
});
API Endpoint
Login API endpoint: POST /login
Usage
Launch the React app and navigate to the login page.
Enter valid login credentials.
Submit the form to perform authentication.
View the result of the login attempt.
Contributing
Feel free to contribute to enhance the functionality or fix issues. Create a pull request with your changes.

License
This project is licensed under the MIT License.

Remember to replace placeholders like `your_mysql_password` with your actual MySQL password and customize any other details based on your project structure and requirements. Additionally, if your project structure differs significantly, you might need to adjust the README accordingly.