当前位置:网站首页>23 very useful nodejs Libraries

23 very useful nodejs Libraries

2021-11-25 17:41:04 Front end Xiaozhi

author :Lokender Singh
translator : The front end little wisdom
source :medium

Have dreams , There are dry goods , WeChat search 【 The big move the world 】 Pay attention to this dish washing wisdom who is still washing dishes in the early morning .

this paper GitHub https://github.com/qq449245884/xiaozhi Included , There is a complete interview site for a large factory 、 Materials and my series .

As a professional developer , We have to keep updating the latest and best Libraries , Because you know the good library , Then the development process can depend on them , This will save us a lot of time and help build high quality software .

Here's a list of common and useful NodeJS library , Anyway, I have collected it myself , For future use

1. Express

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

clipboard.png

Fast 、 Unrestricted 、 minimalist node web frame .

2. Socket.io

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

clipboard.png

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

3. Body-parser

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

clipboard.png

body-parser It's a very common one express middleware , The effect is right. http Request body for parsing .

4. Cors

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

clipboard.png

CORS It's used to provide Connect/Express Middleware node.js Package , Can be used to enable... With a variety of options CORS.

5. Passport

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

clipboard.png

Passport.js It's a simple one 、 Noninvasive Node.js Authentication middleware , It can be integrated into any system based on Express.js Of web Application

6. Multer

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

clipboard.png

Multer It's a Node.js middleware , Used for processing multipart/form-data Type of form data , Mainly used for file upload .

7. Axios

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

clipboard.png

On Promise Of HTTP customer Home end , For browsers and node.js

8. Morgan

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

clipboard.png

morgan yes express Default log middleware , You can also break away from express, As node.js The log component of .

9. Http-errors

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

clipboard.png

Easily create Express,Koa,Connect Waiting HTTP error .

Everyone said that there was no project in the resume , I helped you find a project , There is also a bonus 【 Set up a tutorial 】.

10. Dotenv

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

clipboard.png

Due to different requirements of the project , You need to configure different environment variables , Load different environment variable files on demand , Use dotenv, Can solve this problem perfectly .

Use dotenv, Just write the environment variable configuration of the program in .env In file .

11. Faker

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

clipboard.png

This is a great node modular , be used for mock data .Faker Have their own API, And it's very functional , It's all due to the people who invented it Marak . It can cover almost any use case you want to use , stay Github The document on can also help you familiarize yourself with its usage every minute .

12. Nodemailer

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

clipboard.png

Nodemailer yes nodejs Mail sending module in .

13. Sequelize

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

clipboard.png

What is? ORM?

In short, it's right SQL Encapsulation of query statements , Let's use OOP How to operate the database , Elegant generation security 、 Maintainable SQL Code . Intuitively , It's a kind of Model and SQL The mapping relation of .

Sequelize It's based on Nodejs Powerful asynchronous ORM frame .

Support at the same time PostgreSQL, MySQL, SQLite and MSSQL Multiple databases , Well suited for Nodejs Back end database storage interface , For rapid development Nodejs Lay a solid foundation for application 、 The foundation of security .

since Nodejs The strength of asynchronous is , There's no reason not to find a powerful asynchronous database framework , Cooperate with them .

14 Mongoose

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

clipboard.png

Mongoose yes mongoDB An object model library for , Encapsulates the mongoDB Some common methods such as adding, deleting, modifying and checking documents , Give Way nodejs operation mongoDB Databases become easier .

15 Jest

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

clipboard.png

Jest By Facebook A front-end testing framework , It has many very good features , For example, the execution speed is fast 、API friendly 、 Automatic monitoring 、Snapshot、 Test coverage 、Mock And so on , And it applies to Babel、TypeScript、Node、React、Angular、Vue etc. .

16. Moment

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

clipboard.png

A lightweight JavaScript Date base , For parsing , verification , Operation and formatting date .

17. lodash

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

clipboard.png

Lodash Reduce array 、 Numbers 、 object 、 Strings and other work troubles , It makes JS Make it easier .

18. chalk

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

clipboard.png

chal It can be translated into “ 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

Light weight , quick , Extensible front-end verification tool , No other package dependencies, no styles , It can be used in most situations , Developers can assemble the feedback error information to users according to the project environment .

20. Cheerio

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

clipboard.png

cheerio Used to resolve html Very convenient , It's like using it in a browser jquery equally .

Everyone said that there was no project in the resume , I helped you find a project , There is also a bonus 【 Set up a tutorial 】.

21. JSDoc

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

clipboard.png

JSDoc Is a basis javascript Note information in the file , Generate JavaScript Application or library 、 Modular API file Tools for .

22. Helmet

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

clipboard.png

Helmet It's a series of things that help enhance Node.JS And Express/Connect etc. Javascript Web Middleware for application security .

Some famous ones are right Web The attack has XSS Cross site scripts , Script injection clickjacking And all kinds of non secure requests for Node.js Of Web Applications pose a variety of threats , Use Helmet Can help your app avoid these attacks .

23. Crypto-js

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

clipboard.png

CryptoJS (crypto.js) by JavaScript Provides a variety of encryption algorithms .


Possible after code deployment BUG There's no way to know in real time , In order to solve these problems afterwards BUG, It took a lot of time log debugging , This way, I'd like to recommend an easy-to-use one for you BUG Monitoring tools Fundebug.

original text :https://blog.bitsrc.io/23-ins...

communication

Articles are updated every week , You can search by wechat 【 The big move the world 】 First time reading , reply 【 welfare 】 There are multiple front-end videos waiting for you , this paper GitHub https://github.com/qq449245884/xiaozhi Included , welcome Star.

版权声明
本文为[Front end Xiaozhi]所创,转载请带上原文链接,感谢
https://chowdera.com/2021/11/20211109091141892i.html

随机推荐