Just exploring node.js and came across express; On the npm repository site https://www.npmjs.com/package/express it clearly states installation is
$ npm install express
but if i scroll down the quick start mentions
$ npm install -g express-generator@4
Can someone explain in detail what is going on? I googled and understand in express v3 both were bundled together, but in express v4 the generator was pulled out.
So do i need to install both? does the generator install express automatically but not the other way around? I have JS fatigue already, and i only just started :-(
Supplementary Question: Then to confuse matters even further, i saw another question that asks should I start with 'npm init' and require express, or 'express myApp'. What is really going on now, where does init come into it?
Update 30/Jan/2017 I've accepted an answer below from someone else, but I've also added my own answer which is what i was seeking back then as a confused complete beginner. It may help others.
My understanding is:
As part of the boiler plate files is a package.json file defining the dependencies for your project - ie npm packages that you will need for your project. The express package is listed there.
Knowing the npm install instruction (run with current working directory set to project folder containing the package.json) will "install" all dependencies listed in package.json into your project folder to make them available to your application, it would be sufficient to do: