What is Node.js?
Node.js is an open source, cross-platform runtime environment that allows developers to create a variety of server-side tools and applications using javascript. Node.js is made up of javascript syntax and the API used by Node. In other words, to learn Node well, it is necessary to learn js syntax and node-related apis, such as HTTP module processing, file processing, stream processing and so on
The installation of the node. Js
1. Go to the official website of Node. js and download Node
2. Install the Node version based on your operating system.
3. Finally, enter the node -v command in the command line to check whether the installation is successful and the corresponding version. The following article
Front-end learning node is necessary
1. First, let’s talk about the most commonly used front-end tool, NPM. This package management tool is based on Node. There are always people in the interview who will ask you, do you know NPM, how much does NPM know, blah blah blah.
2. The Node code is based on javascript, so if you choose to learn a back-end language, node learning cost is very low for the front-end engineer, the code can be seamless.
Node has a very active third-party ecosystem and developer community, many of whom are willing to help
Things that Node can do
1. Node can help front-end engineers relate to the server direction, understand the server operation and precautions, and help front-end engineers better cooperate with back-end engineers
2. It is possible to create a Gulp environment based on Node to perform some specific processing on the code. As you can see, gulp is also mentioned in the vue source code. So for understanding the source code, there is also a certain help.
3, learning Node, will learn HTTP, which can be for our future web performance optimization, building blocks.
Learn about node
1. Node involves modules, such as HTTP module, FS module (file processing module), PATH module (file path), etc
2, node storage, involving cookies, session, redies, etc
3, server security problems, such as SQL injection, XSS attacks
4, Nginx server configuration
5. Database related operations
6. Pm2 process daemon
7. If you want to write comfortably, you can also learn about frameworks like Express, KOa, or Egg.