26
Author: Lokender Singh
Translator: Frontend Xiaozhi
Source: medium

If you have dreams and dry goods, search on [Daily Move to the World] Follow this wise brush who is still doing dishes in the early morning.

This article GitHub https://github.com/qq449245884/xiaozhi has been included, the first-line interview complete test site, information and my series of articles.

As professional developers, we must constantly update the latest and best libraries, because knowing a good library, then the development process can rely on them, which will save us a lot of time and help build high-quality software.

Below is a list of common and easy-to-use NodeJS libraries. Anyway, I have already collected them in case I will use them in the future😜

1. Express

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

clipboard.png

Fast, unconstrained, minimalist node web framework.

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 http

4. Cors

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

clipboard.png

CORS is a node.js package used to provide 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, which 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, used to process multipart/form-data type form data, mainly used for file upload.

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 from express as a log component of node.js.

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 included [Building Tutorial] .

10. Dotenv

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

clipboard.png

Due to the different needs of the project, different environment variables need to be configured, and different environment variable files are loaded as needed. Using dotenv can solve this problem perfectly.

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

11. Faker

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

clipboard.png

This is a great node module for mock data. Faker has its own API and is very feature-rich, all thanks to Marak who invented it. It can cover almost any use case you want to use, and the documentation on Github can also help you familiarize yourself 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 ORM?

Simply speaking, it is the encapsulation of SQL query statements, so that we can operate the database in OOP way, 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 multiple databases of PostgreSQL, MySQL, SQLite and MSSQL, which is very suitable as the storage interface of the Nodejs back-end database, laying a solid and safe foundation for the rapid development of Nodejs applications.

Since Nodejs's strength 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 mongoDB an object model library encapsulates mongoDB some common ways to document CRUD, so that nodejs mongoDB database operations easier.

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 it 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, verifying, manipulating and formatting dates.

17. lodash

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

clipboard.png

Lodash reduces the trouble 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 the font color

19. validator

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

clipboard.png

Lightweight, fast, and easy to extend the front-end verification tool, no other packages rely on no style, can be suitable for most use 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 convenient for parsing html, just like using jquery in a browser.

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

21. JSDoc

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

clipboard.png

JSDoc is a tool that generates API documents for JavaScript applications, libraries, and modules based on the annotation information in the JavaScript file.

22. Helmet

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

clipboard.png

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

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

23. Crypto-js

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

clipboard.png

CryptoJS (crypto.js) provides various encryption algorithms for JavaScript.


code that may exist after the code is deployed cannot be known in real time. In order to solve these BUGs afterwards, a lot of time was spent on log debugging. By the way, I would like to recommend a useful BUG monitoring tool Fundebug .

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

comminicate

The article is continuously updated every week, and you can search on [Great Move to the World] Read it for the first time, reply [Benefit] are many front-end videos waiting for you, this article GitHub https://github.com/qq449245884/xiaozhi has been included, welcome to Star.


王大冶
68.1k 声望105k 粉丝