Debian 11 Bullseye
Sponsored Link

Node.js 12 : Install2021/09/22

 
Install Node.js.
[1] Install Node.js 12.
root@dlp:~#
apt -y install nodejs
root@dlp:~#
node -v

v12.22.5

# verify to create test script

root@dlp:~# cat > nodejs_test.js <<'EOF' 
var http = require('http');
var server = http.createServer(function(req, res) {
  res.write("Hello, This is the Node.js Simple Web Server!\n");
  res.end();
}).listen(8080);
EOF 

root@dlp:~#
node nodejs_test.js &

[1] 967
root@dlp:~#
curl localhost:8080

Hello, This is the Node.js Simple Web Server!
root@dlp:~#
kill 967

Matched Content