Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

npm init

  • Create a directory for the project (eg. mynode) and cd into the directory
npm init

This will aske a few questions and create the package.json file.

The questions, and the default answers, you can just accept the defaults.

package name: mynode
version: 1.0.0
description:
entry point: index.js
test command:
git repository:
keywords:
author:
license (ISC):
npm init --yes
  • Would populate the file with the defaults without asking emberassing questions.