如题,题主刚学js,然后有人提到了node.js,始终没明白这是什么东西,是语言还是编程环境?为什么打开以后和终端一样?是在这里面写js吗?但是js不是在html里面写就可以吗?谢谢解答
高洛峰2017-04-17 15:44:11
You can check out this article: What exactly is Node.js? https://www.ibm.com/developer...
You can search before asking a question. Most of the questions can be solved. You can basically find the answers you want through search engines for these types of questions.
巴扎黑2017-04-17 15:44:11
A powerful back-end language that uses js to unify the magical language of the front-end and back-end.
Please refer to Baidu for details
If it doesn’t work, please Google
If it doesn’t work, please check the node.js official websitenode
PHPz2017-04-17 15:44:11
There was no nodejs in this world. Later, some experts wanted to run js on the server side, so they invented nodejs. js is a language, nodejs is server-side js.
After opening nodejs, it is indeed similar to the terminal, and you can indeed write js on it, just like after opening python, you can write python under the python command line.
As for the js you said is written in html, that’s correct. But this js runs on the browser, and there is no browser on the server side, so it depends on nodejs to run js.
I don’t think there is any need to get too entangled with these concepts. It’s enough to have a rough understanding of them. As you use them, your understanding will gradually deepen. It is recommended to read Liao Xuefeng's JavaScript tutorial. Liao Da's lectures are much better than mine.
ringa_lee2017-04-17 15:44:11
I won’t answer the question, baidu.com google.com
Introduction materials: node basic tutorial + other front-end tutorials
黄舟2017-04-17 15:44:11
First, I suggest you go to Baidu, which is much better than asking here.
Second, nodejs is a crazy guy, and he was thinking about how my big JS language can only be used on the front-end, and then I can also unify the world on the back-end. Then nodeJS came out, which is a tool that allows js to run in the background. environment. Node.js on the encyclopedia is a JavaScript running environment based on the Chrome V8 engine. Strictly speaking, it is not a language, just an environment that allows your JS to run in the background.
ringa_lee2017-04-17 15:44:11
Simply put, Node.js is JavaScript running on the server side. Node.js is a platform built on the Chrome JavaScript runtime. A place like a terminal is an environment where js can be run.
大家讲道理2017-04-17 15:44:11
Node.js is an open source, cross-platform, runtime environment that can be used for server-side and network applications.
Node.js is written in C++ language and runs when Node.js is running.
Node.js is owned and maintained by the Node.js Foundation, which has a partnership with the Linux Foundation.
Node.js provides event-driven and non-blocking I/O APIs to optimize application throughput and scale. These techniques are often used in real-time applications.
Node.js uses Google's V engine to execute code. Most of the basic modules of Node.js are written in JavaScript. Node.js contains a series of built-in modules that allow the program to run as a standalone server, thus running independently of Apache HTTP Server or IIS.
以上来自维基百科,一句话介绍之后,还做了些其他的解释,希望可以帮到你.