...

/

Project Setup: Part One

Project Setup: Part One

Learn how to set up a new project, and start working with the npm CLI.

We’ll follow a series of tasks throughout the upcoming lessons as we work on our project.

Task 1: Setup our project folder

  1. Navigate to the folder where we’ll store our new project.

  2. Create a new directory called express-recipes (we could use any name that we like) and change in to it:

Press + to interact
mkdir express-recipes
cd express-recipes

Task 2: Create a package.json file

  1. Turn our project into an npm package by running the following command:

Press + to interact
npm init

Follow the instructions above to create a package.json file in the given terminal:

Terminal 1
Terminal
Loading...

After executing the commands provided in the tasks above, we’ve created our first npm package.

The term “package” refers to a file or directory described by a package.json file. A package must contain a package.json file to be published to the npm registry.

What happens when we run the command above?

The command above loads a questionnaire containing a series of questions about ...