To start working with the MERN stack, you’ll need to install and set up each component of the stack: MongoDB, Express.js, React, and Node.js.
1. Install Node.js and npm
Node.js is required to run JavaScript on the server side, and npm (Node Package Manager) is used to manage packages.
- Download Node.js: Go to the Node.js website and download the LTS version.
- Install Node.js: Follow the installation instructions for your operating system. This will also install npm.
command
2. Install MongoDB
MongoDB is a NoSQL database that stores data in JSON-like documents.
- Download MongoDB: Go to the MongoDB website and download the installer for your operating system.
Step-2
Step-3
After installation the message of completed will be shown.
5. Install Express.js
Express.js is a minimal and flexible Node.js web application framework.
Set Up a New React Project
You can use the create-react-app
tool to set up a new React project. This tool sets up a modern web development environment with a single command.