Create by jsliang on 2018-11-22 08:21:23

Recently revised in 2021-06-12 16:48:11

— — — — — fostered fostered fostered — — — — —

Node series address:

  • Code repository: github.com/LiangJunron…
  • Article repository: github.com/LiangJunron…

— — — — — fostered fostered fostered — — — — —

What, as a front-end copy-and-paste engineer, you still don’t know Node.js?

In his daily work, Jsliang uses Node.js to write handy gadgets, optimize workflows, and forward interface data.

In this series, explore Node.js with friends from the easy to the hard.

A directory

What’s the difference between a free front end and a salted fish

directory
A directory
The second Node. Js is introduced
 2.1 What is Node.js?
 2.2 Advantages of Node.js?
 2.3 Node.js Applications?
Three Node.js development environments
 3.1 the Node. Js
 3.2 Visio Studio Code
Iv References

The second Node. Js is introduced

Returns the directory

2.1 What is Node.js?

Returns the directory

Node.js is a JavaScript runtime environment. It allows JavaScript to develop back-end programs that do almost everything other back-end languages do. It is rumored to be on a par with PHP, JSP, Python, Ruby and other back-end languages.

In practice, however, Node.js is generally used as middleware. For example, when node.js is used as middleware on both the browser and Java side, Node.js invokes the Java backend publishing interface, and Node.js can publish the HTTP interface to the browser.

2.2 Advantages of Node.js?

Returns the directory

  1. Node.js syntax is completely JS syntax, as long as you understand the BASICS of JS can learn node.js backend development.
  2. Node.js has a very high concurrency capability. In a server language such as Java, PHP, or.NET, a new thread is created for each client connection, and each thread consumes approximately 2 MB of memory. That is to say, theoretically an 8GB server, can be connected to the maximum number of users is about 4000. Instead of creating a new thread for each customer, Node.js uses only one thread. So, with Node.js, an 8GB server, you can handle more than 40,000 simultaneous connections.
  3. Implement high-performance servers. Node.js is based on the V8 engine, a high-performance engine developed by Google using C++. This means that the high end JavaScript scripting code written by developers is very close to the execution efficiency of the low end C language written by developers.
  4. Short development cycle, low development cost, low learning cost. Spend minimum hardware cost, pursue higher concurrency, higher processing performance.

2.3 Node.js Applications?

Returns the directory

Three Node.js development environments

Returns the directory

Before you start developing with Node.js, there are a few things to prepare for:

  • Installation Node. Js
  • Install Visio Studio Code

3.1 the Node. Js

Returns the directory

  • Download | Node Node. Js Chinese website
  • The Node installation steps | novice tutorial
  • The Node with the Npm | Liao Xuefeng
  • CNPM | taobao NPM image

The relationship between Node.js, NPM, and CNPM can be summed up in one sentence:

  • NPM is the package management tool of Node.js. The so-called package management tool can be understood as the big guys write some commonly used functions into packages and release them to the NPM market, and then others can use them directly through NPM (similar to mobile app). Because NPM has certain restrictions in China, we need to use taobao mirror CNPM to improve the download and installation speed of our NPM (similar to mobile phone network and WIFI to download mobile app).

Finally, if you have downloaded and installed the environment, type CNPM -v on the console to view your node.js version:

3.2 Visio Studio Code

Returns the directory

To do a good job, he must sharpen his tools.

As a front-end developer, how can you not have your own software development tools

Visio Studio Code (VS Code) is a lightweight Code editor that supports syntax highlighting, intelligent Code completion, custom hotkeys, parenthes-matching, snippets, Code comparison diff, Git, and more.

Of course, developing software is not limited to VS Code, but also Atom, Sublime, WebStorm, etc., which are not covered here.

If the buddy developer tool is different from Jsliang, it’s not always easy to help your buddy troubleshoot problems

Download link and introduction are posted below:

  • Visio Studio Code to install | website
  • Visio Studio Code to install and use skills | blog garden

Node.js and VS Code have been installed, so start exploring!

Iv References

Returns the directory

  • Nodejs Middle Layer Service (PART 2)

Do not toss the front end, and what is the difference between salted fish!

Thumbs up/Star if you think the article is good.

If you need to contact jsliang:

  • Github
  • The Denver nuggets

Contact information stored in the Github home page, insist on a LeetCode every day, insist on learning every day, welcome to toss ~

Jsliang’s document library is licensed by Junrong Liang under the Creative Commons Attribution – Non-commercial – Share alike 4.0 International License. Based on the github.com/LiangJunron… On the creation of works. Outside of this license agreement authorized access can be from creativecommons.org/licenses/by… Obtained.