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
-
- express: creating our server
-
- dotenv: loading environment variables.
-
-
Adding useful middlewares
-
- cors: Introduction to cors
- enabling cors in the API
-
- morgan: generating logs
-
- compression: compacting requests using GZIP middleware
-
- helmet: armouring the API.
-
- body-parser: authenticating the API HTTP requests.
-
- connect-multiparty: parsing multipart-form data requests
-
-
Setting up the routes
-
Setting up the controller
-
Configuring our Database and Models
-
- mongoose: interacting and creating MongoDB models
-
-
Securing our API with Auth0
-
- jwks-rsa: retrieve RSA public keys from a JWKS endpoint
-
- express-jwt: JWT authentication middleware.
-
-
Testing our APIs
-
- chai: BDD/TDD assertion library.
-
- mocha: simple, flexible, fun test framework.
-
- chai-http: chai assertion library with tests for http APIs
-
-
Continous Integration and Test Coverage
-
- coveralls: getting the coverage reporting of coveralls.io.
-
- istanbul: a JS code coverage tool written in JavaScript.
-
-
Test the App
-
Conclusion