Node.js Tools

Collections

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.

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

Framework

https://news.ycombinator.com/item?id=33138903

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
  1. Process Management in Node.js with PM2