Skip to content

Node express session based authentication with EJS, Sequelize(MySQL), NodeMailer etc.

Notifications You must be signed in to change notification settings

mishajib/node-express-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TASKS LIST APP

Installation guide

  • Clone the repository
  • Run from both directories npm install or yarn to install both app dependencies
  • Run from both directories npm start or yarn start to start both apps

Database setup

  • Create a database and change the credentials in config/database.js.
  • Now you are ready to go.
Open http://localhost:5000 in your browser to see the backend app running.

Packages used

  • express (Express used as a web framework)
  • mysql2 (MySQL used as a database)
  • sequelize (Sequelize used as an ORM)
  • cors (CORS used to enable cross-origin resource sharing)
  • connect-flash (Connect-flash used to flash messages)
  • express-session (Express-session used to manage sessions)
  • express-validator (Express-validator used to validate form data)
  • EJS (EJS used as a templating engine)
  • nodemon (Nodemon used to restart the server on file changes)
  • nodemailer (Nodemailer used to send emails)
  • bcrypt (Bcrypt used to hash password)

Features

  • MVC architecture
  • ORM by using Sequelize
  • MySQL database
  • Models
  • Views
  • Controllers
  • Request validation / Requests
  • Routes
  • Session Flash Messages
  • View Engine / Templating Engine
  • Error Handling
  • 404 Error Handling
  • 500 Error Handling
  • etc & more

Note: The backend app is configured to use PORT 5000. Make sure that this port is not used by any other apps on your machine.

Note: The backend app is configured to use the MySQL database on port 3306. Make sure that this port is not used by any other apps on your machine.

Thanks for reading and happy coding!

About

Node express session based authentication with EJS, Sequelize(MySQL), NodeMailer etc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published