NodeJs, the platform for running javascript on the server side, moves the foreground javascript to the server side, and the Google V8 engine makes it run very efficiently, it can run programs asynchronously and without any blocking. nodejs contains http server, which can implement web system design, client-side javascript compiler, and a series of functions for us.
windows computers with Internet access
To download the windows nodejs installation package, go to the nodejs website, find DOWNLOADS, click on the Windows Installer, and select the 64-bit version if you use a 64-bit computer. Click to download.
Install nodejs for windows, click the downloaded file to install, then click next, then select Agree to install protocol, then click next, then you can customize the installation directory default C:\Program Files\nodejs\, then click next, install all components by default then click next, Then click install to install and wait, then click finish to complete the installation.
Write test file test.js here we first put in D disk demo var http = require("http"); http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("test nodjs"); response.end(); }).listen(8899); console.log("nodejs start listen 8899 port!" ); Here we go to Node.js command prompt with 8899 and enter cd C:\Program Files\nodejs\node_modules\npm\test to enter the directory and then node Test.js Type node test.js and the browser opens and you see test nodjs output. The environment is successfully installed and configured
Ensure that the port is not occupied