Home >Web Front-end >Front-end Q&A >What is node.js? What can be done?
Node.js is a JavaScript running environment based on the Chrome V8 engine. It is a development platform that allows JavaScript to run on the server. What Node can do: 1. Develop websites with complex logic; 2. Develop large-scale web applications based on social networks; 3. Develop command line tools, etc.
The operating environment of this tutorial: windows7 system, nodejs version 12.19.0, DELL G3 computer.
What is node.js?
Node.js is a JavaScript running environment based on the Chrome V8 engine. It uses an event-driven, non-blocking I/O model to allow JavaScript to run on the server-side development platform. It Let JavaScript become a scripting language on par with server-side languages such as PHP, Python, Perl, and Ruby.
Before Node.js, JavaScript could only run in the browser and be used as a web page script to add some special effects to the web page or communicate with the server. With Node.js, JavaScript can be separated from the browser and used directly on the computer like other programming languages. It can do whatever it wants without being restricted by the browser.
What can node.js do?
Node.js can do much more than just develop a website. Using Node.js, you can easily develop:
With Websites with complex logic;
Large-scale Web applications based on social networks;
Web Socket server;
TCP/UDP socket application;
Command line tool;
Interactive terminal program;
Native application with graphical user interface;
Unit testing tool;
Client JavaScript compilation device.
Node.js has built-in HTTP server support, which means you can easily implement a website and server combination. This is different from PHP and Perl, because when using PHP, you must first build an HTTP server such as Apache, and then load the module of the HTTP server or call CGI to present the execution results of the PHP script to the user.
When you use Node.js, you don’t need to build an additional HTTP server, because Node.js itself has one built-in. This server can not only be used to debug code, but it can itself be deployed to a production environment and its performance is sufficient to meet the requirements.
Node.js can also be deployed in non-network application environments, such as a command line tool. Node.js can also call C/C code, which can make full use of many existing function libraries, and can also use C/C to implement parts with very high performance requirements.
For more node-related knowledge, please visit: nodejs tutorial! !
The above is the detailed content of What is node.js? What can be done?. For more information, please follow other related articles on the PHP Chinese website!