Before we move on to more boring stuff like setting up or project properly, let’s do something fun! Creating a Hello World Application in NodeJS doesn’t require very much. Since we have the nodejs-package already installed on our system, all we need is a file called server.js
in our project-folder with the following line in it:
|
|
When we execute this script by calling
|
|
we can see “Hello World!” popping up on screen. Fantastic, isn’t it? It will get a lot more complex down the road but you’ve just taken your first step into the world of Node! Having our motivation boosted, we can eagerly move on!