Lets create and start to make a simple node.js application with the following steps. For example, lets create this application MyApp

1. Create a folder where you want to create your application called MyApp
$ mkdir myapp
$ cd myapp

2. Open the folder with Vs Code or your favorite IDE. I will be using VS CODE for this tutorial.
$ code .

3. You should have an empty project with no folders or fildes. Open the terminal in VS CODE (Control + `)

4. Create an empt file called app.js
$ touch app.js

4. Initialize the project with this npm command:
$ npm init -y

If you leave out the -y option, you will need to populate the following fields:

package name: (example1)myapp
version: (1.0.0)
description: Just a very basic nodejs app
entry point: (app.js)
test command:
git repository:
keywords:
author:
license: (ISC)

Is this OK? (yes) yes

5. Now you should have a file called package.json, open this file and add and add start to "scripts": {  - The start object property should now look like this:

  "scripts": {
    "test""echo \"Error: no test specified\" && exit 1",
    "start""node app.js"
  },

5. Add the following code to app.js

console.log("hello world");

6. Now you can run the script in your console using Node.js with the following command:

$ node app.js

Done