This is the 12th day of my participation in the August More Text Challenge. For details, see: August More Text Challenge

Persistence is the key to study, notes are the soul, review the old to know new, from time to time, review the knowledge points, deepen memory, twice the result with half the effort!

Here are some notes about learning Node.js, accumulated over time

More on that in the future, let’s check it out

Recall — the process of visiting a page

What is itNode.JS

Node.js is a JavaScript runtime environment based on Chrome’S V8 engine. Node.js uses an event-driven, non-blocking asynchronous I/O model, making it lightweight and efficient.

  • Node.js can be written in JavaScript

    • Reading and writing files,
    • Execute the child process,
    • Network communication
  • Node.js handles highly concurrent projects efficiently

Node.js’s package manager, NPM, is the largest open source ecosystem in the world.

How to makenode.jsRun, that’s calledjavascriptOperating environment:

  • 1. Open the cli cmd
  • 2, inputnodeCommand to enternodeEnvironment can be writtenjscode
  • 3. Press and hold twicectrl+c(or.exit) out of thenodeOperating environment of

Node.js is a javascript runtime environment, and a browser is a javascript runtime environment.

  • The operating environment of the browser

    • There’s a security mechanism
    • Cannot call the underlying interface file
    • Cannot implement file or directory creation, etc
    • You can recognize it in the browserdombomobject
  • The use of the node. Js

    • The underlying interface file can be invoked
    • You can also create files or directories
    • nodeNot in the environmentbomdomThe concept of

3. Why studynode.js

  • 1. A front end engineer who doesn’t end up is not a good front end
  • 2, many front-end tools are usednodeIn order to use these tools well, you have to learnnode
  • 3,nodeYou can create a server that is a back-end language
  • In April,nodeYou can call very low-level interfaces nodeYou can write desktop applications
  • 5,nodeYou can write to the operating system

4. Install node

Website: Download Node

Node. Js: https://nodejs.org…

Version selection:

  • LTSThe long-used version
  • currentThe latest version
  • Nodejs Version: Major version Minor version Patch version
    • Odd version Unstable version used for testing
    • Even version Stable version

Official documents:

Read the documentation. It’s very well written

  • nodejs.org/api/
  • Nodejs.org/en/docs/gui…
  • Chinese documentation: http://nodejs.cn/api/

Set upnodeServer:

  • 1. Create onenodeProject directory
  • 2. Create onejsfile
  • 3. Run thisjsFile, how to run: through the command linecdTo access the directory throughNode file name.jsperformJs file

Note: whenever the server code changes, you must restart the server (quit the original server to start).

If you start a new server, you must first shut down the server you started (there is a hot update tool called Nodemen).

Request server procedure:

5. What is NPM

After installing Node.js, NPM will also be installed.

NPM is a node package management repository, a website, and a command.

You can use NPM to easily access a vast library of JavaScript tools on the web

Read more

Read more:

【Github】 Multi-person Collaboration (2)

【Github】 Basic use (1),

[Git] Code version control – Git Introduction & Basic operation (1)

[Node.js] Building an Automated development environment – Basic introduction, [Tool Preparation], [Start], [Detailed Steps (4)], [Module Processing Tool (5)], [Modular Programming Understanding],

The following update preview, keep up with the rhythm, step by step

Next, we’ll learn more about Node.js’ package management tool, NPM. Blunt duck!!!!! xdm

Improve development efficiency and empower our development efficiency!

Keep up with the pace of progress, forward refueling

Come on!! go~