Step 1:
npm init in project folder

Step 2:
Add "start": "node index.js" in package.json, like so:

1
2
3
4
5
6
{
  "scripts": {
    "start": "node index.js",    
    "test": "echo \"Error: no test specified\" && exit 1"
  },
}