Bootstrap FreeKB - Node.js - Creating your first NodeJS Hello World app on Linux
Node.js - Creating your first NodeJS Hello World app on Linux

Updated:   |  Node.js articles

If you have not yet installed Node.js, check out my article Install Node.js on Linux.

Let's use the which command to determine if the Node.js node CLI is in your $PATH.

~]$ which node
/usr/bin/node

 

Create a file named app.js that contains the following console.log.

console.log("Hello World");

 

Use the node CLI to run app.js and "Hello World" should be displayed.

~]$ node app.js
Hello World

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter b41d35 in the box below so that we can be sure you are a human.