Skip to content

LewisWH/MySQL-auth-for-Node.js-with-Passport.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL-auth-for-Node.js-with-Passport.js

Login/registration system for Node.js applications using the Express framework, MVC design pattern and Passport.js middleware.

Getting Started

  • Ensure Node.js & MySQL are installed and up to date

  • Clone this repository to the desired directory

  • Enter the directory

cd directorypath
  • Install the required node modules
npm install
  • Add database credentials to .env (dbname, dbusername, dbpassword)

  • Add user table to database

CREATE TABLE `users` (
  `id` int(12) NOT NULL,
  `username` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `password` varchar(100) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Executing the Application

npm start

Screenshots

Login Page

Registration Page

Flash Error Messages

Welcome Page

About

Login/registration system for Node.js applications using the Express framework, MVC design pattern and Passport.js middleware

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published