20
Author: Lokender Singh
Translator: Front-end Xiaozhi
Source: medium

If you have dreams and dry goods, you can search [Moving the World] Follow this Shawanzhi who is still washing dishes in the early morning.

This article GitHub https://github.com/qq449245884/xiaozhi has been included, and there are complete test sites, materials and my series of articles for interviews with first-line manufacturers.

vue3 Source combat out of it: https://appewiejl9g3764.h5.xiaoeknow.com/v1/course/column/p_61fb595ce4b0beaee4275e1e?type=3&entry=2&entry_type=2008&scene=&share_type=5&share_user_id=u_6201b994c63e3_bWY1LynHqu

As professional developers, we have to keep updating the latest and greatest libraries, because knowing good libraries, then the development process can depend on them, which saves us a lot of time and also helps to build high-quality software.

The following is a list of common and easy-to-use NodeJS libraries. Anyway, I have already collected them for future use 😜

1. Express

Address: https://www.npmjs.com/package/express

clipboard.png

Fast, unconstrained, minimalist web framework for node.

2. Socket.io

Address: https://www.npmjs.com/package/socket.io

clipboard.png

Socket.IO supports event-based real-time two-way communication.

3. Body-parser

Address: https://www.npmjs.com/package/body-parser

clipboard.png

body-parser is a very commonly used express middleware, which is used to parse the http request body.

4. Cors

Address: https://www.npmjs.com/package/cors

clipboard.png

CORS is a node.js package for providing Connect/Express middleware which can be used to enable CORS with various options.

5. Passport

Address: https://www.npmjs.com/package/passport

clipboard.png

Passport.js is a simple, non-intrusive Node.js authentication middleware that can be integrated into any Express.js based web application

6. Multer

Address: https://www.npmjs.com/package/multer

clipboard.png

Multer is a Node.js middleware for processing form data of type multipart/form-data , mainly for file uploading.

7. Axios

Address: https://www.npmjs.com/package/axios

clipboard.png

HTTP client for Promise, for browsers and node.js

8. Morgan

Address: https://www.npmjs.com/package/morgan

clipboard.png

morgan is the default log middleware of express, and it can also be used separately as a log component of node.js without express.

9. Http-errors

Address: https://www.npmjs.com/package/http-errors

clipboard.png

Easily create HTTP errors for Express, Koa, Connect, etc.

Everyone said that there is no project to write on the resume, so I helped you find a project, and also attached [Building Tutorial] .

10. Dotenv

Address: https://www.npmjs.com/package/dotenv

clipboard.png

Due to the different requirements of the project, it is necessary to configure different environment variables and load different environment variable files on demand. Using dotenv can perfectly solve this problem.

To use dotenv , you only need to write the program's environment variable configuration in the .env file.

11. Faker

Address: https://www.npmjs.com/package/faker

clipboard.png

This is a great node module for mocking data. Faker has its own API, and it's very feature-rich, all thanks to Marak, who invented it. It can cover almost any use case you want, and the documentation on Github can help you get familiar with its usage in minutes.

12. Nodemailer

Address: https://www.npmjs.com/package/nodemailer

clipboard.png

Nodemailer is the mail sending module in nodejs.

13. Sequelize

Address: https://www.npmjs.com/package/sequelize

clipboard.png

What is an ORM?

Simply put, it is the encapsulation of SQL query statements, allowing us to operate the database in an OOP manner, and elegantly generate safe and maintainable SQL code. Intuitively, it is a mapping relationship between Model and SQL.

Sequelize is a powerful asynchronous ORM framework based on Nodejs.

At the same time, it supports PostgreSQL, MySQL, SQLite and MSSQL databases, which is very suitable as the storage interface of Nodejs backend database, laying a solid and safe foundation for the rapid development of Nodejs applications.

Since the strength of Nodejs lies in asynchrony, there is no reason not to find a powerful database framework that supports asynchrony to cooperate with it.

14 Mongoose

Address: https://www.npmjs.com/package/mongoose

clipboard.png

Mongoose is an object model library of mongoDB , which encapsulates some common methods such as adding, deleting, modifying, and querying documents in mongoDB, making it easier for nodejs to operate the mongoDB database.

15 Jest

Address: https://www.npmjs.com/package/jest

clipboard.png

Jest is a front-end testing framework launched by Facebook. It has many very good features, such as fast execution speed, API friendly, automatic monitoring, Snapshot, test coverage, Mock and other features, and is suitable for Babel, TypeScript, Node, React, Angular, Vue, etc.

16. Moment

Address: https://www.npmjs.com/package/moment

clipboard.png

A lightweight JavaScript date library for parsing, validating, manipulating and formatting dates.

17. lodash

Address: https://www.npmjs.com/package/lodash

clipboard.png

Lodash Reduces the hassle of working with arrays, numbers, objects, strings, etc. It makes JS easier.

18. chalk

Address: https://www.npmjs.com/package/chalk

clipboard.png

chal can be translated as "chalk", node terminal style library, the main function is to make the output no longer monotonous, add text background, change font color

19. validator

Address: https://www.npmjs.com/package/validator

clipboard.png

Lightweight, fast, and easily extensible front-end verification tool, no other package dependencies or styles, can be suitable for most usage scenarios, developers can assemble feedback error messages to users according to the project environment.

20. Cheerio

Address: https://www.npmjs.com/package/cheerio

clipboard.png

cheerio is very handy for parsing html, just like using jquery in the browser.

Everyone said that there is no project to write on the resume, so I helped you find a project, and also attached [Building Tutorial] .

21. JSDoc

Address: https://www.npmjs.com/package/jsdoc

clipboard.png

JSDoc is a tool for generating API documentation of JavaScript applications or libraries and modules based on the comment information in JavaScript files.

22. Helmet

Address: https://www.npmjs.com/package/helmet

clipboard.png

Helmet is a series of middleware that helps to enhance the security of Javascript web applications such as Express/Connect in Node.JS.

Some well-known web attacks include XSS, cross-site scripting, script injection, clickjacking, and various non-secure requests that pose various threats to Node.js web applications. Using Helmet can help your applications avoid these attacks.

23. Crypto-js

Address: https://www.npmjs.com/package/crypto-js

clipboard.png

CryptoJS (crypto.js) provides a wide variety of encryption algorithms for JavaScript.


The possible bugs after the code is deployed cannot be known in real time. In order to solve these bugs afterwards, a lot of time is spent on log debugging. By the way, I recommend a useful bug monitoring tool Fundebug .

Original: https://blog.bitsrc.io/23-insanely-useful-nodejs-you-should-know-in-2020-5a9b570d5416

communicate with

If you have dreams and dry goods, search [Moving the World] attention to this Shawanzhi who is still washing dishes in the early morning.

This article has been included in GitHub https://github.com/qq449245884/xiaozhi . There are complete test sites, materials and my series of articles for interviews with first-tier manufacturers.


王大冶
68k 声望104.9k 粉丝