I am trying to do a homework for a mongodb uni course. They gave us some files, instructions are:
run npm install mongodb then node app.js<
npm install mongodb
node app.js
npm init
It is all you need. It will create the package.json file on the fly for you.