Simply put, Node.js is JavaScript running on the server side.
Node.js is a platform built on the Chrome JavaScript runtime.
Node.js is an event-driven I/O server-side JavaScript environment. It is based on Google's V8 engine. The V8 engine executes JavaScript very fast and has very good performance.
文章推荐
How does Node.js implement asynchronous resource context sharing? 》
This article uses the simplest possible way to introduce how Node.js implements asynchronous resource context sharing, and how asynchronous resource context sharing is useful to us.
"Locking Project Node Version and Package Manager"
The Node.js versions of member machines are not uniform: 12.x for the old school, 14.x for the conservative, and 17.x for the radical. Whether the project can run normally depends on God's will, and the online risks can be imagined in the scenario where there is no CICD pipeline to support the local npm run build.
Some people are used to using npm, some people are used to using yarn, and there are often cases where package-lock.json and yarn.lock files exist at the same time in the code base. The more painful point is that there are no clues to troubleshoot all kinds of strange problems.
All we have to do is strangle the problem at the source: lock down the Node.js version and package manager
This article mainly records and summarizes:
Node.js child process creation
The difference and connection between fork and spawn
Ipc realizes inter-process communication
WebSocket implements inter-process communication
"Node Abnormal Data Response Troubleshooting (pm2 Cluster Mode, Asynchronous)"
Do not start Cluster cluster mode:
Because the local is non-Cluster cluster mode, it behaves normally. Then the first solution is to not turn on the cluster mode in the production environment, but in general this solution is not advisable, the request in the production environment is relatively high, and the cluster mode is the optimal solution.Increase single-instance data service | Downgrade to single-instance mode:
Similar to redis, but a new single-instance nodeJs script. Getting data & updating data is requesting this script service.
Because cluster mode is not used, there is no sharing problem. At the same time, it also avoids the problem of the previous solution, because the data service is not open to the outside world, only for the service of the intranet, so the request level will not be too large.
"[nodejs advanced journey (2)]: use koa2+mysql to implement list data paging"
The main fields of paging include pageSize number of items per page, pageNum number of pages, startRow current starting page number, endRow current ending page number, and total total number. Mainly according to the parameters of front-end paging, after processing, returning the correct data on the front-end is actually a very common and simple function, but it is also very important.
"node+express build web server deployment front-end project"
Traditional front-end project deployment relies on the tomcat service as a static resource server. With the separation of front-end and back-end processes, front-end projects need to be deployed separately. For front-end deployment, in addition to using nginx to build a static resource server, we can also use node to build a web server. Let me share with you how to use node to build a web server.
Top WebSocket Libraries for Node.js in 2022
In this post, we'll discuss eight Node.js WebSocket libraries you should consider in 2022.
SockJS
ws
Socket.IO
Faye WebSocket
SocketCluster
Sockette
Feathers
"Using node-config to create configuration files in Node.js"
Managing multiple configuration files across different environments can be challenging, and there are multiple tools that are trying to solve this problem in different ways. However, in this article, we will learn how to use node-config to create and manage Node.js configuration files across different deployment environments.
"Front-end architect breaking skills, NodeJS landing WebSocket practice"
This article introduces the implementation of WebSocket in Node.js from the perspective of network protocol, technical background, security and production applications.
The content presented in this article includes the following aspects:
network protocol evolution
Socket.IO?
ws module implementation
Express integration
WebSocket instance message broadcast security and authentication
BFF application
"How to Safely Execute User's Custom Nodejs Scripts"
This article will introduce how to safely execute the user's mysterious code in the scenario where the user-defined nodejs script needs to be executed during the business development process.
"Front-end Node.js Interview Questions"
Node basic concepts
All Node objects Talk about the understanding of the process Talk about the understanding of the fs module Talk about the understanding of the Stream Event loop mechanism
EventEmitter
How middleware designs and implements JWT authentication
Node performance monitoring and optimization
热门问答
- What does statble: 1 mean in NodeJS?
- nodejs load balancing problem
- How Nodejs implements the packet capture function
- How does node turn local images into network URLs
- Does nodejs' https.request support timeout processing?
- How to realize the delay task of nodejs, can you use setTimeout?
- Nodejs+Puppeteer batch access HTML to build multiple PDF issues locally
- Nodejs nested callback hell, how to optimize?
课程推荐
"Node.js Advanced Practice · Hands-on with you to build an animation website"
Course gains:
- Fundamentals of Asynchronous Programming and HTTP Programming
- Usage of the most popular Koa2 framework
- Database access technology that allows you to easily write various SQL queries
- Various common web programming techniques allow you to quickly develop fully functional web services
- The complete project process and best engineering practices can greatly shorten the project experience gap between you and the old drivers
- A large number of common usages of middleware and third-party components
- Greatly improve your development efficiency and improve your code quality
- The idea of component development and the tools and methods of high-quality programming
- Advance to the position of Architecture Engineer and lay the foundation
For people:
- For engineers with some front-end development experience, through the study of the course, you can master the technology of back-end development, so that you can get through the two veins of front-end development and back-end development, allowing you to become a full-stack engineer, expand and widen , own skill area.
- For engineers with less project experience, through the course study, you can master the project process and best engineering practices, allowing you to integrate faster and better, teamwork, and let you play an important role in the project team.
PS: What technical content do you want to see, you can leave a message in the comment area~
If you have any questions, you can add Ms. WeChat~
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。