Skip to content

๐Ÿš† Starter template for local authentication with validation using passport, express, node and mongodb

License

Notifications You must be signed in to change notification settings

godcrampy/Express-Local-Auth-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Express Local Auth Template

Starter template for local authentication with validation using passport, express, node and mongodb. The template includes eslint, webpack, node-sass, passport etc. All bundled with config files as well. Some decisions like the use of scss as preprocessor, ejs as template engine, mongoose for odm, eslint for linting have been made to reduce the initial setup time but you can use alternatives as well by changing a few lines of code.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • node v10+
  • npm v6+

Installing

  1. Clone this repsitory git clone https://github.com/godcrampy/express-local-auth-template.git

  2. Install the dependencies npm install

  3. Start the server npm start

Directory Structure

  1. config This directory contains config for the mongodb and passport

  2. models Contains the user model and any other future model

  3. public webpack and sass will bundle their files in this directory

  4. routes All the routes for the project

  5. sass Write your sass/scss here

  6. scripts Write your frontend js logic here. See webpack.config.js

  7. views Templete files

Customising

The following components can be replaced with your favorite ones by making minimal code changes:

  1. CSS Preprocessing:
  • Current: SCSS
  • Alternatives: SASS, no preprocessor
  1. CSS Framework:
  • Current: Bulma
  • Alternatives: Bootstrap, Semantic UI, Foundation, no framework
  1. Bundling:
  • Current: webpack
  • Alternatives: Parcel, rollup.js, no bundlers
  1. Template Engine:
  • Current: ejs
  • Alternatives: Pug, Moustache

Built With

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details