Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Title: 16 useful NPM packages to use in Node.js + Express apps.

  • Introduction

  • What is Node.js?

  • What is NPM (Node Package Manager)?

  • What is Express?

  • What NPM packages will we use

  • App We will build

  • Server setup

      1. express: creating our server
      1. dotenv: loading environment variables.
  • Adding useful middlewares

      1. cors: Introduction to cors
      • enabling cors in the API
      1. morgan: generating logs
      1. compression: compacting requests using GZIP middleware
      1. helmet: armouring the API.
      1. body-parser: authenticating the API HTTP requests.
      1. connect-multiparty: parsing multipart-form data requests
  • Setting up the routes

  • Setting up the controller

  • Configuring our Database and Models

      1. mongoose: interacting and creating MongoDB models
  • Securing our API with Auth0

      1. jwks-rsa: retrieve RSA public keys from a JWKS endpoint
      1. express-jwt: JWT authentication middleware.
  • Testing our APIs

      1. chai: BDD/TDD assertion library.
      1. mocha: simple, flexible, fun test framework.
      1. chai-http: chai assertion library with tests for http APIs
  • Continous Integration and Test Coverage

      1. coveralls: getting the coverage reporting of
      1. istanbul: a JS code coverage tool written in JavaScript.
  • Test the App

  • Conclusion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment