Skip to content

Susandsouza/MernStackProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MERN Login Task

A simple MERN stack project demonstrating login and signup functionality using React and PostgreSQL.
Backend is built with Express.js, and frontend is a React app.


πŸ“ File Structure


mern-login/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.js
β”‚   β”œβ”€β”€ db.js
β”‚   β”œβ”€β”€ models/
β”‚      β”œβ”€β”€ user.js
β”‚
└── frontend/
└── (React app)

βš™οΈ Backend Setup

cd backend
npm init -y
npm install 

To run the backend:

node app.js

βš›οΈ Frontend Setup

npx create-react-app frontend
cd frontend
npm install react-router-dom

or

npm i

To run the frontend:

npm start

βœ… Usage

  1. Open the signup page to create a new user.
  2. Use the login page to authenticate with your email and password.
  3. After successful login, you will be redirected to the home page.
  4. Click Logout to return to the login page.

---

If you want, I can also add a **table of API endpoints** in the README (`/signup`, `/login`, `/home`) so it looks very **professional for submission**.  

Do you want me to add that?

mern-task-2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors