Create a directory mkdir
change the directory cd npm init (this command will give you a package.json). don't forget to give your entry point for a project(server.js) install required dependencies(express, mongoose, body-parser) These dependencies will be added in your package.json.