How to run Node.js script from the command line
Buat project dan file javascript index.js
console.log("Hello Node.js");
untuk menjalankan code JavaScript dalam Node.js kita gunakan perintah node <nama_file.js>, sebelumnya kita telah membuat project dan file javascript
$node index.js
Hello Node.js
Source Code project bisa didownload dari GitHub nodejs-tutorial