All Projects → Fcmam5 → mini-express-boilerplate

Fcmam5 / mini-express-boilerplate

Licence: MIT license
A minimal Express boilerplate with passport user authentication, mongoose and some security setup configured

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to mini-express-boilerplate

express-mvc
A light-weight mvc pattern for express framework with minimum dependencies
Stars: ✭ 23 (+53.33%)
Mutual labels:  mongoose, expressjs, passportjs
WordNook
Dynamically updating blogging website to upload articles and blog posts on various topics, developed using ejs template engine and node js in the backend.
Stars: ✭ 80 (+433.33%)
Mutual labels:  mongoose, expressjs, ejs
Pepaverse
Pepaverse is an open source social network build with nodejs, mongoDB, passportjs and socket.io
Stars: ✭ 16 (+6.67%)
Mutual labels:  mongoose, ejs, passportjs
node-express-mongo-passport-jwt-typescript
A Node.js back end web application with REST API, user JWT authentication and MongoDB data storage using TypeScript
Stars: ✭ 51 (+240%)
Mutual labels:  mongoose, expressjs, passportjs
passport-examples
A variety of examples using PassportJS with ExpressJS and ReactJS applications
Stars: ✭ 44 (+193.33%)
Mutual labels:  mongoose, expressjs, passportjs
Node Express Mongoose Passport Jwt Rest Api Auth
Node, express, mongoose, passport and JWT REST API authentication example
Stars: ✭ 146 (+873.33%)
Mutual labels:  mongoose, expressjs, passportjs
Friend.ly
A social media platform with a friend recommendation engine based on personality trait extraction
Stars: ✭ 41 (+173.33%)
Mutual labels:  mongoose, ejs, passportjs
MovieGo
A Website implemented using MERN (MongoDB, ExpressJS, ReactJS and NodeJS) stack, which allows users to sign-in/register and book movie tickets online.
Stars: ✭ 26 (+73.33%)
Mutual labels:  mongoose, expressjs, passportjs
dhiwise-nodejs
DhiWise Node.js API generator allows you to instantly generate secure REST APIs. Just supply your database schema to DhiWise, and a fully documented CRUD APIs will be ready for consumption in a few simple clicks. The generated code is clean, scalable, and customizable.
Stars: ✭ 224 (+1393.33%)
Mutual labels:  mongoose, expressjs
AmigoChat-Realtime-Chat-Application
AmigoChat is a responsive real-time chat application built on MERN Stack and Socket io.
Stars: ✭ 22 (+46.67%)
Mutual labels:  mongoose, expressjs
Online-Examination-System
Technologies : React js, Node js, Express js, Mongo Db, Ant Design, Redux js Key features: 1. User management 2. Modular code 3. Permission management 4. Persistent answers on page refresh in the test portal 5. Examination results using graphs 6. Results can directly be downloaded as excel sheet 7. Feedback system
Stars: ✭ 37 (+146.67%)
Mutual labels:  mongoose, expressjs
nodejs-shopping-cart
NodeJS / Express / MongoDB - Shopping Cart (monolithic app with handlebars)
Stars: ✭ 42 (+180%)
Mutual labels:  mongoose, expressjs
MERN-JWT-AND-ROLE-AUTH
Neccessary features needed for your mern Application are now available.
Stars: ✭ 30 (+100%)
Mutual labels:  mongoose, expressjs
Express-MongoDB-Authentication
A simple authentication app using Express & MongoDB
Stars: ✭ 15 (+0%)
Mutual labels:  mongoose, expressjs
Natours
An awesome tour booking web app written in NodeJS, Express, MongoDB 🗽
Stars: ✭ 94 (+526.67%)
Mutual labels:  mongoose, expressjs
express-mongodb-crud
Web Application CRUD using Nodejs and Mongodb
Stars: ✭ 87 (+480%)
Mutual labels:  mongoose, expressjs
express-mquery
Expose mongoose query API through HTTP request.
Stars: ✭ 37 (+146.67%)
Mutual labels:  mongoose, expressjs
passport-magic
Magic is a Passport.js strategy that enables passwordless authentication middleware for any Express.js based application.
Stars: ✭ 35 (+133.33%)
Mutual labels:  expressjs, passportjs
nestjs-rest-sample
NestJS RESTful APIs Sample
Stars: ✭ 204 (+1260%)
Mutual labels:  mongoose, expressjs
todo-list
A practical web application built with Node.js, Express, and MySQL for you to readily record, view, and manage your tasks with an account: Create, view, edit, delete, filter, and sort expenses are as easy as pie 🥧
Stars: ✭ 18 (+20%)
Mutual labels:  expressjs, passportjs

Mini Express boilerplate

Looking for a Clementine.js-like, a boilerplate that contains the minimum so I get started on my projects. This boilerplate is built upon the excellent Express Generator.

Features

  • ExpressJS 4

  • Uses Mongoose 4.11

  • Passport authentication

    • Local (using email and password)
    • Facebook authentication
    • Twitter authentication
  • Stores sessions MongoDB

  • CORS is engabled

  • Uses SASS stylesheets (autocompiled)

  • Uses EJS templating language

  • MVC structure

  • Security

  • User Schema (Authentication, CRUD API)

  • If the user is logged in req.user will be available via a global variable called user for usage in views.

Getting Started

Prerequisites

Usage

To use this template you need to clone it, install dependencies, add your API keys (in order to work with Facebook and Twitter authentication APIs).

# Clone this repository in a new folder, let's call it "my-boilerplate"
git clone my-boilerplate

# Navigate to "my-boilerplate"
cd my-boilerplate

# Install NPM dependencies
npm install # If you prefer YARN just run "yarn install"

# Copy the .env file example to a new file and place your API keys there
# .env file will be ignored by GIT and it should contain your secret Data/Keys
cp .env.example .env

Getting API keys

The .env file must contain you Facebook and Twitter API keys you can get these keys from:

Securing forms against CSRF

You must add this tag to your <form>

<input type="hidden" name="_csrf" value="<%=csrftoken%>" />

If you want to disable CSRF protection:

  • Comment these lines in app.js

    app.use(csrf());
    app.use(function(req, res, next){
     res.locals.csrftoken = req.csrfToken();
     console.log(req.csrfToken());
     next();
    });
  • Remove tags using csrftoken variable ( views/users/login.ejs and views/users/signup.ejs )

Contributing

Feel free to fork this project and add whatever you like, if you have any suggestions or any comments please feel free to contact me or to open an issue.

TODO

  • Link password accounts
  • Work on front-end
  • Add awesome stuffs
  • When creating a new acocunt from Facebook or Twitter update his mail in profile (add to model)
  • Implement password recovery system

Authors

License

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

Acknowledgments

This project wouldn't be possible without all these amazing tutorials and these precious recourses:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].