Node Express Mongodb Jwt Rest Api Skeleton

screenshot of Node Express Mongodb Jwt Rest Api Skeleton
express

This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API). Demo of frontend in VueJS here: https://github.com/davellanedam/vue-skeleton-mvp

Overview

The Node.js express.js MongoDB JWT REST API - Basic Project Skeleton is a basic API REST skeleton written in JavaScript using async/await. It is designed to help developers create a basic REST API easily with Node.js. The project is created and maintained by Daniel Avellaneda, an open-source enthusiast. This project is great for building a starter web API that can be consumed by various front-end frameworks.

Features

  • Multiple environment ready (development, production)
  • Custom email/password user system with basic security and blocking for preventing brute force attacks
  • Compressed responses
  • Secured HTTP headers
  • CORS ready
  • Cache ready with Redis
  • HTTP request logger in development mode
  • i18n ready for sending emails in multiple languages
  • User roles
  • Pagination ready
  • User profile
  • Users list for admin area
  • Cities model and controller example
  • Login access log with IP, browser, and country location
  • API autogenerated documentation by Postman
  • API collection example for Postman
  • Testing with mocha/chai for API endpoints
  • NPM scripts for cleaning and seeding the MongoDB database
  • NPM script for keeping good source code formatting using prettier and ESLint
  • Use of ESLint for good coding practices
  • Mailer example with Nodemailer and Mailgun
  • Ability to refresh token
  • JWT Tokens, make requests with a token after login with Authorization header with value Bearer yourToken
  • Requirements include Node.js 10+, MongoDB 3.6+, and Redis 5.0+

Summary

The Node.js express.js MongoDB JWT REST API - Basic Project Skeleton is a powerful and simple JavaScript project that allows developers to easily create a basic REST API using Node.js. It provides a range of features including user authentication, security measures, caching, logging, and more. The project is actively maintained and has been downloaded by web developers worldwide. It also includes comprehensive documentation and examples for easy implementation.

express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.