Skip to content

Naseem77/mern-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MERN Authentication

MERN stack application with authentication

It includes:

  • Backend API with Express & MongoDB
  • Routes for auth, logout, register, profile, update profile
  • JWT authentication stored in HTTP-only cookie
  • Protected routes and endpoints
  • Custom middleware to check JSON web token and store in cookie
  • Custom error middleware
  • React frontend to register, login, logout, view profile, and update profile
  • React Bootstrap UI library
  • React Toastify notifications

Env Variables

MONGO_URL= mongodb uri
PORT=5000
NODE_ENV=development
JWT_SECRET=EXAMPLE1234

Install Dependencies (frontend & backend)

npm install
cd frontend
npm install

Run


# Run frontend (:3000) & backend (:5000)
npm run dev

# Run backend only
npm run server

# Run frontend only
npm run client

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published