Node.js Tools
Collections
- New in Node.js:
node:
protocol imports - 5 Express Middleware Libraries Every Developer Should Know
- Helmet — Increase HTTP Header Security
- Cookie-parser — Parse Cookies
- Passport — Access to Wide Range of Authentication Mechanisms
- Morgan— Log HTTP Requests and Errors
- CORS — Allow or Restrict Requested Resources on a Web Server
- better-sqlite3 - The fastest and simplest library for SQLite3 in Node.js.
- Runtime compatibility across JavaScript runtimes
- Node.js Toolbox - Find actively maintained and popular libraries in the Node.js ecosystem
CLI
- PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.
- Development practices our NodeJS developers follow
- Use efficient tools to restart your app
- Nodemon: Nodemon automatically restarts the application whenever a fresh change is made to the code. You can initialize Nodemon by replacing the node with nodemon on the command line.
- Forever: Forever provides automatic restarting along with additional configuration options. These options include writing logs and setting a working directory that would normally be printed on stdout to a file.
- PM2: PM2 is an excellent process management tool you can use to better up your development. It allows more control and features to manage processes running in production compared to the other two. Furthermore, it ensures that the application restarts as quickly as possible in case the server it’s running on goes down.
- Use efficient tools to restart your app
NPM
Validation
- joi - The most powerful data validation library for JS
- Ajv JSON schema validator - The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
- express-validator - An express.js middleware for validator.js.
Log
- winston is designed to be a simple and universal logging library with support for multiple transports. A transport is essentially a storage device for your logs. Each winston logger can have multiple transports (see: Transports) configured at different levels (see: Logging levels). For example, one may want error logs to be stored in a persistent remote location (like a database), but all logs output to the console or a local file.
- 🌲 pino - super fast, all natural json logger
Auth
- node-jsonwebtoken - JsonWebToken implementation for node.js http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html
Framework
There is a Laravel for Node.js - https://adonisjs.com/
+1 for Adonis. I've been using it for some time, together with unpoly + alpinejs and it's a real pleasure. I'm really productive with this stack. In fact, their docs site is built using these tools: https://github.com/adonisjs/docs.adonisjs.com/blob/develop/package.json
Children