Create the Express Project
Create a new folder for the REST API application.
Open the terminal and execute the following commands.
The commands create the project directory, navigate into it, and initialize npm.
Initialize Express Project
mkdir nodejs-rest-api
cd nodejs-rest-api
npm init -yCreates the application directory and generates package.json.
Key Takeaways
Create a separate project directory.
Initialize npm before installing dependencies.
package.json stores application metadata and dependencies.