{"id":2354,"date":"2023-11-13T23:12:40","date_gmt":"2023-11-13T23:12:40","guid":{"rendered":"https:\/\/blog.technbrains.com\/blog\/?p=2354"},"modified":"2023-11-17T01:26:25","modified_gmt":"2023-11-17T01:26:25","slug":"how-to-develop-a-mern-stack-application","status":"publish","type":"post","link":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/","title":{"rendered":"How to develop a MERN Stack Application: A Comprehensive Guide"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">If you are a software developer, you must have heard of the LAMP stack that comprises Linux, Apache, MySQL and PHP. These are open-source components that allow developers to build dynamic websites and web applications. However, in recent years, MERN stack has gained popularity as a development stack that is used to create scalable web and mobile applications.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this comprehensive guide, we will delve into the world of the MERN stack, equipping you with the knowledge and skills needed to excel in <a href=\"https:\/\/www.technbrains.com\/web-application\/web-development-company\/\">web development<\/a>. The MERN stack, which stands for MongoDB, Express.js, React, and Node.js, is a popular choice for building dynamic and efficient web applications. This guide aims to provide a thorough understanding of each component of the stack and guide you through the process of creating your own MERN-based projects.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_Is_MERN_Stack\"><\/span><b>What Is MERN Stack?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The MERN stack is a full-stack JavaScript solution that encompasses four key technologies:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">MongoDB: A NoSQL database that stores data in a flexible, JSON-like format. It is known for its scalability and high-performance capabilities.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Express.js: A web application framework for Node.js that simplifies the development of web applications by providing a range of powerful features and tools.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">React: A JavaScript library for building user interfaces. React allows you to create interactive and responsive UI components for your web applications.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Node.js: A server-side JavaScript runtime environment that enables the execution of JavaScript code on the server. It&#8217;s known for its speed and efficiency in handling network requests.<\/span><\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"Express_JS\"><\/span><b>Express JS<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">For those wondering about \u201cwhat is express js\u201d we have the answer for you. Express js is a critical component of the MERN stack, which stands for MongoDB, Express.js, React, and Node.js. Each of these technologies serves a specific role within the stack, and Express.js is responsible for handling the back-end aspects of web applications in the MERN architecture.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here&#8217;s how Express.js is related to the MERN stack:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Back-End Development: Express.js is the back-end framework within the MERN stack. It provides a robust and efficient platform for building the server-side of web applications. It handles tasks such as routing, middleware, database connections, and API development.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">API Creation: In a MERN stack application, Express.js is commonly used to create APIs that allow the front-end, built with React, to communicate with the back-end server. This is crucial for sending and receiving data, user authentication, and other server-related tasks.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Routing: Express.js enables the definition of routes and endpoints for your application, which helps manage how client requests are processed. This is essential for handling different HTTP methods and serving specific URLs, ensuring a structured and organized application.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Middleware: Middleware functions in Express.js play a pivotal role in tasks like authentication, logging, error handling, and more. They help enhance the functionality of the server and provide a way to execute code in a specific order within the request-response cycle.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Integration with MongoDB: In the MERN stack, MongoDB is the NoSQL database used to store and retrieve data. Express.js facilitates the connection to MongoDB, allowing your application to interact with the database seamlessly. This integration is essential for creating dynamic and data-driven web applications.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Node.js: Express.js is built on top of Node.js, which is the server-side JavaScript runtime. Node.js provides the foundation for Express.js to work, making the MERN stack a full-stack JavaScript solution.<\/span><\/li>\n<\/ol>\n<h4><em>Summary:<\/em><\/h4>\n<p><span style=\"font-weight: 400;\">Express.js serves as the backbone of the MERN stack, handling the server-side logic, routing, and API creation. It seamlessly integrates with MongoDB, the database component, and works alongside React, the front-end library, to create efficient and dynamic web applications. The MERN stack&#8217;s strength lies in its uniform use of JavaScript across the entire stack, making development smoother and more efficient.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"JavaScript_and_MERN_Stack\"><\/span><b>JavaScript and MERN Stack<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">JavaScript and the MERN stack are closely related, with JavaScript serving as the foundational language that ties all the components of the MERN stack together. The MERN stack is named after four key technologies, all of which are closely intertwined with JavaScript:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">MongoDB: MongoDB is a NoSQL database that stores data in a JSON-like format known as BSON (Binary JSON). JavaScript&#8217;s object-oriented nature and JSON compatibility make it easy to work with MongoDB, allowing developers to interact with the database using JavaScript.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Express.js: Express.js is a web application framework for Node.js, which is a server-side JavaScript runtime. Being built on Node.js, Express.js leverages JavaScript to create web servers and handle server-side logic, making it a seamless part of the MERN stack.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">React: React is a JavaScript library for building user interfaces. It allows developers to create interactive and responsive front-end components for web applications. React is a central part of the MERN stack&#8217;s front-end development, enabling the creation of user-friendly and dynamic interfaces.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Node.js: Node.js is a server-side JavaScript runtime environment. It&#8217;s used in the MERN stack to run the back-end server and handle tasks such as routing, middleware, and database operations. Node.js&#8217;s non-blocking I\/O and event-driven architecture make it well-suited for building high-performance web applications.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">The strong connection between JavaScript and the MERN stack comes from the use of JavaScript across both the client-side (React) and server-side (Express.js and Node.js) components of the stack. This uniformity in programming language simplifies the development process and reduces the learning curve for developers. JavaScript&#8217;s versatility, asynchronous capabilities, and extensive ecosystem of libraries and tools make it a powerful choice for creating web applications within the MERN stack.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2361\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/1.png\" alt=\"benefits of MERN stack\" width=\"1044\" height=\"570\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/1.png 1044w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/1-300x164.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/1-1024x559.png 1024w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/1-768x419.png 768w\" sizes=\"auto, (max-width: 1044px) 100vw, 1044px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Benefits_of_Using_MERN_Stack\"><\/span><b>Benefits of Using MERN Stack<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Using the MERN (MongoDB, Express.js, React, Node.js) stack for web development offers several notable benefits:<\/span><\/p>\n<ul>\n<li>\n<h4>Uniform Language:<\/h4>\n<\/li>\n<\/ul>\n<p>The MERN stack is built entirely on JavaScript, allowing developers to use a single programming language across the entire stack. This uniformity simplifies development, as there&#8217;s no need to switch between different languages for front-end and back-end tasks.<\/p>\n<ul>\n<li>\n<h4>Efficiency:<\/h4>\n<\/li>\n<\/ul>\n<p>Node.js, a key component of the MERN stack, is designed for asynchronous, non-blocking I\/O operations. This means that web applications built with the MERN stack can handle multiple requests simultaneously, leading to faster and more responsive applications.<\/p>\n<ul>\n<li>\n<h4>Reusability:<\/h4>\n<\/li>\n<\/ul>\n<p>React, the front-end library in the MERN stack, promotes the creation of reusable UI components. This reusability not only speeds up development but also ensures consistency in the user interface, making it easier to maintain and update your application.<\/p>\n<ul>\n<li>\n<h4>Flexibility:<\/h4>\n<\/li>\n<\/ul>\n<p>MongoDB, the NoSQL database in the stack, offers a schema-less design, making it easy to adapt your database structure as project requirements evolve. This flexibility is particularly useful for agile development and rapidly changing data models.<\/p>\n<ul>\n<li>\n<h4>Scalability:<\/h4>\n<\/li>\n<\/ul>\n<p>MongoDB&#8217;s scalability is well-suited for applications with growing user bases and large amounts of data. You can easily scale your application horizontally, adding more servers to handle increased traffic.<\/p>\n<ul>\n<li>\n<h4>Responsive User Interfaces:<\/h4>\n<\/li>\n<\/ul>\n<p>React&#8217;s virtual DOM and component-based architecture make it easier to create dynamic and interactive user interfaces. Users experience faster page loading and smooth interactions, enhancing the user experience.<\/p>\n<ul>\n<li>\n<h4>Rich Ecosystem:<\/h4>\n<\/li>\n<\/ul>\n<p>Both React and Node.js have large and active developer communities. This results in a rich ecosystem of open-source libraries, packages, and tools that can be leveraged to streamline development and solve various challenges.<\/p>\n<ul>\n<li>\n<h4>Isomorphic Applications:<\/h4>\n<\/li>\n<\/ul>\n<p>MERN stack applications can be built to be isomorphic, meaning they can run on both the server and the client. This can improve SEO and provide faster initial page loads by rendering content on the server side.<\/p>\n<ul>\n<li>\n<h4>Rapid Development:<\/h4>\n<\/li>\n<\/ul>\n<p>The combination of Express.js and React allows developers to quickly create and prototype web applications. The stack&#8217;s simplicity and efficiency enable rapid development cycles, reducing time-to-market.<\/p>\n<ul>\n<li>\n<h4>Strong Performance:<\/h4>\n<\/li>\n<\/ul>\n<p>Node.js and React are known for their speed and efficiency, ensuring that MERN stack applications perform well even under high traffic loads.<\/p>\n<ul>\n<li>\n<h4>Community Support:<\/h4>\n<\/li>\n<\/ul>\n<p>The MERN stack has a vast online community, forums, and tutorials. This support network makes it easier to find solutions to common issues and stay up-to-date with best practices.<\/p>\n<p><span style=\"font-weight: 400;\">MERN stack&#8217;s benefits include a consistent and efficient development experience, fast and responsive user interfaces, adaptability to changing project requirements, and a strong developer ecosystem. These advantages make it an excellent choice for building modern web applications.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2362 size-full\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/2.png\" alt=\"key components of MERN stack\" width=\"1070\" height=\"603\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/2.png 1070w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/2-300x169.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/2-1024x577.png 1024w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/2-768x433.png 768w\" sizes=\"auto, (max-width: 1070px) 100vw, 1070px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Key_Components_of_MERN_Stack\"><\/span><b>Key Components of MERN Stack<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>1.<\/b><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><b>MongoDB<\/b><\/h3>\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/www.mongodb.com\/\">MongoDB<\/a> is a document-oriented NoSQL database that stores data in BSON (Binary JSON) format. This structure allows for flexibility in handling different types of data. MongoDB&#8217;s key features include:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Scalability: MongoDB easily handles large amounts of data and traffic, making it an excellent choice for applications with growing user bases.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Aggregation Framework: Powerful aggregation capabilities for querying and data analysis.<\/span><\/li>\n<\/ul>\n<h3><b>2.<\/b><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><b>\u00a0Express.js<\/b><\/h3>\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/expressjs.com\/\">Express.js<\/a> is a minimal and flexible Node.js web application framework. It simplifies the creation of web applications and APIs. Key features of Express.js include:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Middleware: Easily integrate third-party middleware to enhance your application&#8217;s functionality.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Routing: Define routes to handle different HTTP methods and URLs.<\/span><\/li>\n<\/ul>\n<h3><b>3.<\/b><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><b>React<\/b><\/h3>\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/react.dev\/\">React<\/a> is a JavaScript library for building user interfaces. It allows for the creation of reusable UI components, making it easier to manage and maintain your application&#8217;s front end. Key features of React include:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Virtual DOM: Efficient updates and rendering of components for improved performance.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Component-Based Architecture: Building applications as a collection of components simplifies development and maintenance.<\/span><\/li>\n<\/ul>\n<h3><b>4.<\/b><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><b>Node.js<\/b><\/h3>\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/nodejs.org\/en\/\">Node.js<\/a> is a server-side JavaScript runtime that powers the back end of MERN applications. It offers the following advantages:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Non-Blocking I\/O: Node.js is designed for asynchronous, non-blocking I\/O operations, ensuring that your applications remain responsive.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Vast Ecosystem: A rich collection of libraries and modules available via npm (Node Package Manager).<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Setting_Up_Your_MERN_Stack_Development_Environment\"><\/span><b>Setting Up Your MERN Stack Development Environment<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">To get started with the MERN stack, you will need to set up your development environment. Here are the steps to follow:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Install Node.js: Download and install Node.js from the official website.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Initialize a Node.js Project: Create a new Node.js project using the \u201cnpm init\u201d command.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Set Up MongoDB: Install MongoDB and create a database for your application.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Create an Express.js Application: Build the back end of your application using Express.js.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Develop the Front End with React: Design your application&#8217;s user interface using React.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Connect the Front End and Back End: Establish communication between the front end and back end of your application.<\/span><\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"Building_Your_First_MERN_Stack_Application\"><\/span><b>Building Your First MERN Stack Application<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Creating your first MERN (MongoDB, Express.js, React, Node.js) application is an exciting journey into the world of modern web development. In this guide, we&#8217;ll walk you through the essential steps to get started and build your very own MERN application. By the end of this process, you&#8217;ll have a functioning web application with a back end and front end, ready to be deployed for the world to see.<\/span><\/p>\n<h3><b>Prerequisites<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Before you dive into MERN application development, make sure you have the following tools and knowledge:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Node.js<\/b><span style=\"font-weight: 400;\">: Ensure you have Node.js installed on your computer. You can download it from the official website.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Text Editor<\/b><span style=\"font-weight: 400;\">: Choose a text editor or integrated development environment (IDE) to write your code. Popular options include Visual Studio Code, Sublime Text, or Atom.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>MongoDB<\/b><span style=\"font-weight: 400;\">: Install MongoDB locally or use a cloud-based MongoDB service like MongoDB Atlas. You&#8217;ll need a MongoDB database to store your application&#8217;s data.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Command Line<\/b><span style=\"font-weight: 400;\">: Familiarize yourself with using the command line or terminal to run commands and navigate through your project.<\/span><\/li>\n<\/ol>\n<h3><b>Step 1\u2014Install Node<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">To install Node, visit<\/span><a href=\"https:\/\/nodejs.org\/en\/\"> <span style=\"font-weight: 400;\">https:\/\/nodejs.org\/en\/<\/span><\/a><span style=\"font-weight: 400;\">\u00a0 You can choose between the LTS and current versions.<\/span><\/p>\n<h3><b>Step 2\u2014Create a New Node Project<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Let&#8217;s create a project directory for your Node project since you already have <\/span><em><b>Node.js<\/b><\/em><span style=\"font-weight: 400;\"> and <\/span><em><b>MongoDB<\/b><\/em><span style=\"font-weight: 400;\"> installed. Open a new terminal window and execute the following code to create a new Node project directory in any convenient location on your local machine. Then switch to that directory.<\/span><\/p>\n<pre><strong><em>&gt; mkdir myProject &amp;&amp; cd myProject\r\n<\/em><\/strong><strong><em>&gt; mkdir server &amp;&amp; cd server<\/em><\/strong><\/pre>\n<p><span style=\"font-weight: 400;\">To start a new Node.js project, simply copy and paste the following code into a new file:<\/span><\/p>\n<pre><em><strong>&gt; npm init -y<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">A new <\/span><em><b>package.json<\/b><\/em><span style=\"font-weight: 400;\"> file will be created, containing information about your app and its dependencies.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Install the dependencies:<\/span><\/p>\n<pre><em><strong>&gt; npm install express cors dotenv<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">The above command uses some important keywords to install the necessary packages that we will use in our project. Here&#8217;s what each of these keywords does:<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">`express`: This installs the web framework for Node.js. Using this framework will make our life easier.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">`cors`: This installs a package that allows cross-origin resource sharing in Node.js.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">`dotenv`: This installs the module that loads environment variables from a `.env` file into the `process.env` file. This lets you separate configuration files from the code.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">To check the installed dependencies, we can refer to the `<\/span><em><b>package.json<\/b><\/em><span style=\"font-weight: 400;\">` file. It should list all the packages along with their versions.<\/span><\/p>\n<h3><b>Step 3\u2014Create a Node.js Express Server<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Start by creating a file named <\/span><em><b>server.js<\/b><\/em><span style=\"font-weight: 400;\">. Then, type the following code into it and save:<\/span><\/p>\n<pre><em><strong>myProject\/server\/server.js<\/strong><\/em>\r\n<em><strong>const express = require(\"express\");<\/strong><\/em>\r\n<em><strong>const app = express();<\/strong><\/em>\r\n<em><strong>const cors = require(\"cors\");<\/strong><\/em>\r\n<em><strong>require(\"dotenv\").config({ path: \".\/config.env\" });<\/strong><\/em>\r\n<em><strong>const port = process.env.PORT || 5000;<\/strong><\/em>\r\n<em><strong>app.use(cors());<\/strong><\/em>\r\n<em><strong>app.use(express.json());<\/strong><\/em>\r\n<em><strong>app.use(require(\".\/routes\/record\"));<\/strong><\/em>\r\n<em><strong>\/\/ Get MongoDB driver connection<\/strong><\/em>\r\n<em><strong>const dbo = require(\".\/db\/conn\");<\/strong><\/em>\r\n<em><strong>app.listen(port, () =&gt; {<\/strong><\/em>\r\n<em><strong> \u00a0\/\/ Perform a database connection when server starts<\/strong><\/em>\r\n<em><strong> \u00a0dbo.connectToServer(function (err) {<\/strong><\/em>\r\n<em><strong>if (err) console.error(err);<\/strong><\/em>\r\n<em><strong> \u00a0});<\/strong><\/em>\r\n<em><strong> \u00a0console.log(`Server is running on port: ${port}`);<\/strong><\/em>\r\n<em><strong>});<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">Here, we are requiring express and cors to be used. The const port process.env.port will access the port variable from the config.env we require.<\/span><\/p>\n<h3><b>Step 4\u2014Install Mongoose and MongoDB<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">To get started with MongoDB, we will be using the free tier of<\/span> <span style=\"font-weight: 400;\">MongoDB Atlas<\/span><span style=\"font-weight: 400;\"> cloud-based database-as-a-service. It&#8217;s the easiest way to get up and running with MongoDB. For the frontend, we will use Mongoose, which is an asynchronous MongoDB object modeling tool.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can install<\/span><a href=\"https:\/\/www.npmjs.com\/package\/mongoose\"> <span style=\"font-weight: 400;\">Mongoose<\/span><\/a><span style=\"font-weight: 400;\"> in your Node.js project&#8217;s package.json using npm. Simply navigate to your project folder and use the following command to install it:<\/span><\/p>\n<pre><em><strong>&gt; npm install mongoose<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">This command installs Mongoose and the MongoDB driver, allowing Node.js applications to connect to and manipulate data in the database.<\/span><\/p>\n<h3><b>Step 5\u2014Connect to MongoDB Database<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Open a terminal window in the <\/span><b>&#8216;server&#8217;<\/b><span style=\"font-weight: 400;\"> directory and execute this command to connect to the database:<\/span><\/p>\n<pre><strong><em>&gt; touch config.env<\/em><\/strong><\/pre>\n<p><span style=\"font-weight: 400;\">To connect to your MongoDB Atlas database, you first need to assign the connection string to a new variable &#8216;ATLAS_URI&#8217; inside the &#8216;config.env&#8217; file. To do this, go to your<\/span><a href=\"https:\/\/www.mongodb.com\/\"> <span style=\"font-weight: 400;\">Atlas<\/span><\/a><span style=\"font-weight: 400;\"> cluster and click on the <\/span><b>&#8216;CONNECT&#8217;<\/b><span style=\"font-weight: 400;\"> button. This will launch the Cluster Connection Wizard. The Wizard will then guide you through the process of adding your current IP address to the IP Access List and creating a new MongoDB user (if you haven&#8217;t created one already). Make sure you note the username and password you use for the new MongoDB user as you&#8217;ll need it later.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Next, the Wizard will prompt you to choose a connection method. You need to select <\/span><b>&#8216;Connect<\/b> <b>Your<\/b> <b>Application&#8217;<\/b><span style=\"font-weight: 400;\">. Then, when asked to select your driver version, choose &#8216;Node.js and 3.6 or later&#8217;. Finally, copy the provided connection string and paste it into your &#8216;config.env&#8217; file. Your file should look like the example below:<\/span><\/p>\n<pre><b>myProject\/server\/config.env<\/b>\r\n<em><strong>ATLAS_URI=mongodb+srv:\/\/&lt;username&gt;:&lt;password&gt;@sandbox.jadwj.mongodb.net\/employees?retryWrites=true&amp;w=majority<\/strong><\/em>\r\n<em><strong>PORT=5000<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">Note: Replace &lt;username&gt; and &lt;password&gt; with your database credentials.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Then, create a new folder named <\/span><b>&#8216;<em>db<\/em>&#8216;<\/b><span style=\"font-weight: 400;\"> under the server directory.<\/span><\/p>\n<pre><strong><em>&gt; mkdir db &amp;&amp; cd db<\/em><\/strong><\/pre>\n<p><span style=\"font-weight: 400;\">Inside it, create a file called <\/span><em><b>conn.js<\/b><\/em><span style=\"font-weight: 400;\">. Here we can add the following code to connect to our database.<\/span><\/p>\n<pre><em><strong>&gt; touch conn.js<\/strong><\/em>\r\n<em><strong>myProject\/server\/db\/conn.js<\/strong><\/em>\r\n<em><strong>const { MongoClient } = require(\"mongodb\");<\/strong><\/em>\r\n<em><strong>const Db = process.env.ATLAS_URI;<\/strong><\/em>\r\n<em><strong>const client = new MongoClient(Db, {<\/strong><\/em>\r\n<em><strong> \u00a0useNewUrlParser: true,<\/strong><\/em>\r\n<em><strong> \u00a0useUnifiedTopology: true,<\/strong><\/em>\r\n<em><strong>});<\/strong><\/em>\r\n<em><strong>var _db;<\/strong><\/em>\r\n<em><strong>module.exports = {<\/strong><\/em>\r\n<em><strong> \u00a0connectToServer: function (callback) {<\/strong><\/em>\r\n<em><strong>client.connect(function (err, db) {<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0\u00a0\/\/ Verify we got a good \"db\" object<\/strong><\/em>\r\n<em><strong> \u00a0 if (db)<\/strong><\/em>\r\n<em><strong> \u00a0 {<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0 _db = db.db(\"employees\");<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0 console.log(\"Successfully connected to MongoDB.\");<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0\u00a0}<\/strong><\/em>\r\n<em><strong> \u00a0 return callback(err);<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0 });<\/strong><\/em>\r\n<em><strong> \u00a0},<\/strong><\/em>\r\n<em><strong> \u00a0getDb: function () {<\/strong><\/em>\r\n<em><strong>return _db;<\/strong><\/em>\r\n<em><strong> \u00a0},<\/strong><\/em>\r\n<em><strong>};<\/strong><\/em><\/pre>\n<h3><b>Step 6\u2014Create the Server API Endpoints\/ Routes<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">After completing the database and server, it&#8217;s time to create the Server API endpoints. Start by creating a &#8220;<\/span><em><b>routes<\/b><\/em><span style=\"font-weight: 400;\">&#8221; folder and adding &#8220;<\/span><em><b>record.js<\/b><\/em><span style=\"font-weight: 400;\">&#8221; to it. Go back to the &#8220;server&#8221; directory and create the new directory and file.<\/span><\/p>\n<pre><em><strong>&gt; cd ..\/server &amp;&amp; mkdir routes<\/strong><\/em>\r\n<em><strong>&gt; touch routes\/record.js<\/strong><\/em>\r\n\r\n<span style=\"font-weight: 400;\">copy and paste the provided code into the \"<\/span><b>record.js<\/b><span style=\"font-weight: 400;\">\" file located in the \"routes\" folder.<\/span>\r\n\r\n<em><strong>myProject\/server\/routes\/record.js<\/strong><\/em>\r\n<em><strong>const express = require(\"express\");<\/strong><\/em>\r\n<em><strong>\/\/ recordRoutes is an instance of the express router.<\/strong><\/em>\r\n<em><strong>\/\/ We use it to define our routes.<\/strong><\/em>\r\n<em><strong>\/\/ The router will be added as a middleware and will take control of requests starting with path \/record.<\/strong><\/em>\r\n<em><strong>const recordRoutes = express.Router();<\/strong><\/em>\r\n<em><strong>\/\/ This will help us connect to the database<\/strong><\/em>\r\n<em><strong>const dbo = require(\"..\/db\/conn\");<\/strong><\/em>\r\n<em><strong>\/\/ This helps convert the id from string to ObjectId for the _id.<\/strong><\/em>\r\n<em><strong>const ObjectId = require(\"mongodb\").ObjectId;<\/strong><\/em>\r\n<em><strong>\/\/ This section will help you get a list of all the records.<\/strong><\/em>\r\n<em><strong>recordRoutes.route(\"\/record\").get(function (req, res) {<\/strong><\/em>\r\n<em><strong>let db_connect = dbo.getDb(\"employees\");<\/strong><\/em>\r\n<em><strong>db_connect<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0.collection(\"records\")<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0.find({})<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0.toArray(function (err, result) {<\/strong><\/em>\r\n<em><strong>  if (err) throw err;<\/strong><\/em>\r\n<em><strong>  res.json(result);<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0});<\/strong><\/em>\r\n<em><strong>});<\/strong><\/em>\r\n<em><strong>\/\/ This section will help you get a single record by id<\/strong><\/em>\r\n<em><strong>recordRoutes.route(\"\/record\/:id\").get(function (req, res) {<\/strong><\/em>\r\n<em><strong>let db_connect = dbo.getDb();<\/strong><\/em>\r\n<em><strong>let myquery = { _id: ObjectId(req.params.id) };<\/strong><\/em>\r\n<em><strong>db_connect<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0.collection(\"records\")<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0.findOne(myquery, function (err, result) {<\/strong><\/em>\r\n<em><strong>  if (err) throw err;<\/strong><\/em>\r\n<em><strong>  res.json(result);<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0});<\/strong><\/em>\r\n<em><strong>});<\/strong><\/em>\r\n<em><strong>\/\/ This section will help you create a new record.<\/strong><\/em>\r\n<em><strong>recordRoutes.route(\"\/record\/add\").post(function (req, response) {<\/strong><\/em>\r\n<em><strong>let db_connect = dbo.getDb();<\/strong><\/em>\r\n<em><strong>let myobj = {<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0name: req.body.name,<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0position: req.body.position,<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0level: req.body.level,<\/strong><\/em>\r\n<em><strong>};<\/strong><\/em>\r\n<em><strong>db_connect.collection(\"records\").insertOne(myobj, function (err, res) {<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0if (err) throw err;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0response.json(res);<\/strong><\/em>\r\n<em><strong>});<\/strong><\/em>\r\n<em><strong>});<\/strong><\/em>\r\n<em><strong>\/\/ This section will help you update a record by id.<\/strong><\/em>\r\n<em><strong>recordRoutes.route(\"\/update\/:id\").post(function (req, response) {<\/strong><\/em>\r\n<em><strong>let db_connect = dbo.getDb();<\/strong><\/em>\r\n<em><strong>let myquery = { _id: ObjectId(req.params.id) };<\/strong><\/em>\r\n<em><strong>let newvalues = {<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0$set: {<\/strong><\/em>\r\n<em><strong>  name: req.body.name,<\/strong><\/em>\r\n<em><strong>  position: req.body.position,<\/strong><\/em>\r\n<em><strong>  level: req.body.level,<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0},<\/strong><\/em>\r\n<em><strong>};<\/strong><\/em>\r\n<em><strong>db_connect<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0.collection(\"records\")<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0.updateOne(myquery, newvalues, function (err, res) {<\/strong><\/em>\r\n<em><strong>  if (err) throw err;<\/strong><\/em>\r\n<em><strong>  console.log(\"1 document updated\");<\/strong><\/em>\r\n<em><strong>  response.json(res);<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0});<\/strong><\/em>\r\n<em><strong>});<\/strong><\/em>\r\n<em><strong>\/\/ This section will help you delete a record<\/strong><\/em>\r\n<em><strong>recordRoutes.route(\"\/:id\").delete((req, response) =&gt; {<\/strong><\/em>\r\n<em><strong>let db_connect = dbo.getDb();<\/strong><\/em>\r\n<em><strong>let myquery = { _id: ObjectId(req.params.id) };<\/strong><\/em>\r\n<em><strong>db_connect.collection(\"records\").deleteOne(myquery, function (err, obj) {<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0if (err) throw err;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0console.log(\"1 document deleted\");<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0response.json(obj);<\/strong><\/em>\r\n<em><strong>});<\/strong><\/em>\r\n<em><strong>});<\/strong><\/em>\r\n<em><strong>module.exports = recordRoutes;<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">It&#8217;s time to start your server to test if it&#8217;s functional. Open a terminal in the same directory as your server.js file and copy:<\/span><\/p>\n<pre><em><strong>&gt; node server.js<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">If everything goes smoothly, you should be able to view the following output:<\/span><\/p>\n<pre><strong><em>Server is running on port: 5000<\/em><\/strong>\r\n<strong><em>Successfully connected to MongoDB.<\/em><\/strong><\/pre>\n<p><span style=\"font-weight: 400;\">Let&#8217;s shift our focus to the front end, now that we&#8217;ve successfully wrapped up the back end. This is where we&#8217;ll really be able to showcase our creativity and provide an exceptional user experience.<\/span><\/p>\n<h3><b>Step 7\u2014Create a React Application<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">To install your React application, you need to run the create-react-app command in the root directory of your project.<\/span><\/p>\n<pre><strong><em>&gt; npx create-react-app client<\/em><\/strong><\/pre>\n<p><span style=\"font-weight: 400;\">A new directory will be created for your React frontend app. Navigate to the client folder to view the React application code.<\/span><\/p>\n<pre><em><strong>&gt; cd client &amp;&amp; ls<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">To proceed, open the &#8220;<\/span><b>client<\/b><span style=\"font-weight: 400;\">&#8221; directory and launch a new terminal window. After that, you will need to install two extra dependencies.<\/span><\/p>\n<pre><strong><em>&gt; npm install bootstrap<\/em><\/strong>\r\n<strong><em>react-router-dom<\/em><\/strong><\/pre>\n<p><b>Bootstrap<\/b><span style=\"font-weight: 400;\"> allows for quick deployment of pre-made templates and components for web applications, eliminating the need to write code from scratch. <\/span><b>React<\/b><span style=\"font-weight: 400;\">&#8211;<\/span><b>router-dom<\/b><span style=\"font-weight: 400;\"> installs React router components for web applications.<\/span><\/p>\n<h3><b>Step 8\u2014Set Up the React Router<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">To begin setting up the React Router, you should first clear out the contents of the src folder.<\/span><\/p>\n<pre><em><strong>&gt; rm src\/**\/*<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">Firstly, create a new folder, and then add two additional files named <\/span><em><b>index.js<\/b><\/em><span style=\"font-weight: 400;\"> and <\/span><em><b>App.js<\/b><\/em><span style=\"font-weight: 400;\"> to the folder.<\/span><\/p>\n<pre><strong><em>&gt; touch src\/index.js src\/App.js<\/em><\/strong><\/pre>\n<p><span style=\"font-weight: 400;\">To add the following code, go inside the <\/span><em><b>src\/index.js<\/b><\/em><span style=\"font-weight: 400;\"> file:<\/span><\/p>\n<pre><em><strong>import React from \"react\";<\/strong><\/em>\r\n<em><strong>import ReactDOM from \"react-dom\";<\/strong><\/em>\r\n<em><strong>import App from \".\/App\";<\/strong><\/em>\r\n<em><strong>import { BrowserRouter } from \"react-router-dom\";<\/strong><\/em>\r\n<em><strong>ReactDOM.render(<\/strong><\/em>\r\n<em><strong> \u00a0&lt;React.StrictMode&gt;<\/strong><\/em>\r\n<em><strong>&lt;BrowserRouter&gt;<\/strong><\/em>\r\n<em><strong> \u00a0 &lt;App \/&gt;<\/strong><\/em>\r\n<em><strong>&lt;\/BrowserRouter&gt;<\/strong><\/em>\r\n<em><strong> \u00a0&lt;\/React.StrictMode&gt;,<\/strong><\/em>\r\n<em><strong> \u00a0document.getElementById(\"root\")<\/strong><\/em>\r\n<em><strong>);<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">We use <\/span><b>&lt;BrowserRouter&gt;<\/b><span style=\"font-weight: 400;\"> to synchronize our UI with the browser&#8217;s URL for seamless component transitions.<\/span><\/p>\n<h3><b>Step 9\u2014Create the React Components<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">To organize our code better, we will create a <\/span><b>&#8216;<em>components<\/em>&#8216;<\/b><span style=\"font-weight: 400;\"> folder inside the <\/span><b>&#8216;<em>src<\/em>&#8216;<\/b><span style=\"font-weight: 400;\"> directory. For every component we create, we will add a new .js file to this folder. Our app needs to perform three main tasks:<\/span><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\"> Create an employee<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> Edit employees<\/span><\/li>\n<li><span style=\"font-weight: 400;\"> View all employees<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">To achieve these tasks, we will create four files for each: <\/span><b><em>create.js, edit.js, navbar.js, and recordList.js<\/em>.<\/b><\/p>\n<pre><em><strong>&gt; mkdir src\/components<\/strong><\/em>\r\n<em><strong>(cd src\/components &amp;&amp;<\/strong><\/em>\r\n<em><strong>touch create.js edit.js navbar.js recordList.js)<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">An image of each file will appear as follows:<\/span><\/p>\n<pre><em><b>create.js<\/b><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">The following code will enable users to create new records by submitting a create command to our server.<\/span><\/p>\n<pre><strong><em>import React, { useState } from \"react\";<\/em><\/strong>\r\n<strong><em>import { useNavigate } from \"react-router\";<\/em><\/strong>\r\n<strong><em>export default function Create() {<\/em><\/strong>\r\n<strong><em>const [form, setForm] = useState({<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0name: \"\",<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0position: \"\",<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0level: \"\",<\/em><\/strong>\r\n<strong><em>});<\/em><\/strong>\r\n<strong><em>const navigate = useNavigate();<\/em><\/strong>\r\n<strong><em> \/\/ These methods will update the state properties.<\/em><\/strong>\r\n<strong><em>function updateForm(value) {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0return setForm((prev) =&gt; {<\/em><\/strong>\r\n<strong><em>  return { ...prev, ...value };<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0});<\/em><\/strong>\r\n<strong><em>}<\/em><\/strong>\r\n<strong><em> \/\/ This function will handle the submission.<\/em><\/strong>\r\n<strong><em>async function onSubmit(e) {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0e.preventDefault();<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\/\/ When a post request is sent to the create url, we'll add a new record to the database.<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0const newPerson = { ...form };<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0await fetch(\"http:\/\/localhost:5000\/record\/add\", {<\/em><\/strong>\r\n<strong><em>  method: \"POST\",<\/em><\/strong>\r\n<strong><em>  headers: {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 \"Content-Type\": \"application\/json\",<\/em><\/strong>\r\n<strong><em>  },<\/em><\/strong>\r\n<strong><em>  body: JSON.stringify(newPerson),<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0})<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0.catch(error =&gt; {<\/em><\/strong>\r\n<strong><em>  window.alert(error);<\/em><\/strong>\r\n<strong><em>  return;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0});<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0setForm({ name: \"\", position: \"\", level: \"\" });<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0navigate(\"\/\");<\/em><\/strong>\r\n<strong><em>}<\/em><\/strong>\r\n<strong><em> \/\/ This following section will display the form that takes the input from the user.<\/em><\/strong>\r\n<strong><em>return (<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;div&gt;<\/em><\/strong>\r\n<strong><em>  &lt;h3&gt;Create New Record&lt;\/h3&gt;<\/em><\/strong>\r\n<strong><em>  &lt;form onSubmit={onSubmit}&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;div className=\"form-group\"&gt;<\/em><\/strong>\r\n<strong><em>  \u00a0 \u00a0 &lt;label htmlFor=\"name\"&gt;Name&lt;\/label&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"text\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"form-control\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id=\"name\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value={form.name}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 onChange={(e) =&gt; updateForm({ name: e.target.value })}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;div className=\"form-group\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;label htmlFor=\"position\"&gt;Position&lt;\/label&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"text\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"form-control\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id=\"position\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value={form.position}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 onChange={(e) =&gt; updateForm({ position: e.target.value })}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;div className=\"form-group\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;div className=\"form-check form-check-inline\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"form-check-input\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"radio\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 name=\"positionOptions\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id=\"positionIntern\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value=\"Intern\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 checked={form.level === \"Intern\"}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 onChange={(e) =&gt; updateForm({ level: e.target.value })}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;label htmlFor=\"positionIntern\" className=\"form-check-label\"&gt;Intern&lt;\/label&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;div className=\"form-check form-check-inline\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"form-check-input\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"radio\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 name=\"positionOptions\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id=\"positionJunior\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value=\"Junior\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 checked={form.level === \"Junior\"}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 onChange={(e) =&gt; updateForm({ level: e.target.value })}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;label htmlFor=\"positionJunior\" className=\"form-check-label\"&gt;Junior&lt;\/label&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;div className=\"form-check form-check-inline\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"form-check-input\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"radio\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 name=\"positionOptions\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id=\"positionSenior\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value=\"Senior\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 checked={form.level === \"Senior\"}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 onChange={(e) =&gt; updateForm({ level: e.target.value })}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;label htmlFor=\"positionSenior\" className=\"form-check-label\"&gt;Senior&lt;\/label&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;div className=\"form-group\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"submit\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value=\"Create person\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"btn btn-primary\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em>  &lt;\/form&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;\/div&gt;<\/em><\/strong>\r\n<strong><em>);<\/em><\/strong>\r\n<strong><em>}<\/em><\/strong><\/pre>\n<h4><b>edit.js<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">The following code will serve as an editing component for our records. It will use a similar layout to the create component and will eventually submit an update command to our server.<\/span><\/p>\n<pre><strong><em>import React, { useState, useEffect } from \"react\";<\/em><\/strong>\r\n<strong><em>import { useParams, useNavigate } from \"react-router\";<\/em><\/strong>\r\n<strong><em>export default function Edit() {<\/em><\/strong>\r\n<strong><em>const [form, setForm] = useState({<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0name: \"\",<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0position: \"\",<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0level: \"\",<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0records: [],<\/em><\/strong>\r\n<strong><em>});<\/em><\/strong>\r\n<strong><em>const params = useParams();<\/em><\/strong>\r\n<strong><em>const navigate = useNavigate();<\/em><\/strong>\r\n<strong><em> useEffect(() =&gt; {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0async function fetchData() {<\/em><\/strong>\r\n<strong><em>  const id = params.id.toString();<\/em><\/strong>\r\n<strong><em>  const response = await fetch(`http:\/\/localhost:5000\/record\/${params.id.toString()}`);<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0if (!response.ok) {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 const message = `An error has occurred: ${response.statusText}`;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 window.alert(message);<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 return;<\/em><\/strong>\r\n<strong><em>  }<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0const record = await response.json();<\/em><\/strong>\r\n<strong><em>  if (!record) {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 window.alert(`Record with id ${id} not found`);<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 navigate(\"\/\");<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 return;<\/em><\/strong>\r\n<strong><em>  }<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0setForm(record);<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0fetchData();<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0return;<\/em><\/strong>\r\n<strong><em>}, [params.id, navigate]);<\/em><\/strong>\r\n<strong><em> \/\/ These methods will update the state properties.<\/em><\/strong>\r\n<strong><em>function updateForm(value) {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0return setForm((prev) =&gt; {<\/em><\/strong>\r\n<strong><em>  return { ...prev, ...value };<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0});<\/em><\/strong>\r\n<strong><em>}<\/em><\/strong>\r\n<strong><em> async function onSubmit(e) {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0e.preventDefault();<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0const editedPerson = {<\/em><\/strong>\r\n<strong><em>  name: form.name,<\/em><\/strong>\r\n<strong><em>  position: form.position,<\/em><\/strong>\r\n<strong><em>  level: form.level,<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0};<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\/\/ This will send a post request to update the data in the database.<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0await fetch(`http:\/\/localhost:5000\/update\/${params.id}`, {<\/em><\/strong>\r\n<strong><em>  method: \"POST\",<\/em><\/strong>\r\n<strong><em>  body: JSON.stringify(editedPerson),<\/em><\/strong>\r\n<strong><em>  headers: {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 'Content-Type': 'application\/json'<\/em><\/strong>\r\n<strong><em>  },<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0});<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0navigate(\"\/\");<\/em><\/strong>\r\n<strong><em>}<\/em><\/strong>\r\n<strong><em> \/\/ This following section will display the form that takes input from the user to update the data.<\/em><\/strong>\r\n<strong><em>return (<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;div&gt;<\/em><\/strong>\r\n<strong><em>  &lt;h3&gt;Update Record&lt;\/h3&gt;<\/em><\/strong>\r\n<strong><em>  &lt;form onSubmit={onSubmit}&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;div className=\"form-group\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;label htmlFor=\"name\"&gt;Name: &lt;\/label&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"text\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"form-control\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id=\"name\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value={form.name}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 onChange={(e) =&gt; updateForm({ name: e.target.value })}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;div className=\"form-group\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;label htmlFor=\"position\"&gt;Position: &lt;\/label&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"text\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"form-control\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id=\"position\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value={form.position}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 onChange={(e) =&gt; updateForm({ position: e.target.value })}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;div className=\"form-group\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;div className=\"form-check form-check-inline\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"form-check-input\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"radio\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 name=\"positionOptions\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id=\"positionIntern\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value=\"Intern\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 checked={form.level === \"Intern\"}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 onChange={(e) =&gt; updateForm({ level: e.target.value })}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;label htmlFor=\"positionIntern\" className=\"form-check-label\"&gt;Intern&lt;\/label&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;div className=\"form-check form-check-inline\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"form-check-input\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  type=\"radio\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 name=\"positionOptions\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id=\"positionJunior\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value=\"Junior\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 checked={form.level === \"Junior\"}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 onChange={(e) =&gt; updateForm({ level: e.target.value })}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;label htmlFor=\"positionJunior\" className=\"form-check-label\"&gt;Junior&lt;\/label&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;div className=\"form-check form-check-inline\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"form-check-input\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"radio\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 name=\"positionOptions\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 id=\"positionSenior\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value=\"Senior\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 checked={form.level === \"Senior\"}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 onChange={(e) =&gt; updateForm({ level: e.target.value })}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;label htmlFor=\"positionSenior\" className=\"form-check-label\"&gt;Senior&lt;\/label&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;br \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;div className=\"form-group\"&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;input<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type=\"submit\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 value=\"Update Record\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 className=\"btn btn-primary\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;\/div&gt;<\/em><\/strong>\r\n<strong><em>  &lt;\/form&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;\/div&gt;<\/em><\/strong>\r\n<strong><em>);<\/em><\/strong>\r\n<strong><em>}<\/em><\/strong><\/pre>\n<h4><b>recordList.js<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">The following code fetches all the records in our database via GET.<\/span><\/p>\n<pre><strong><em>import React, { useEffect, useState } from \"react\";<\/em><\/strong>\r\n<strong><em>import { Link } from \"react-router-dom\";<\/em><\/strong>\r\n<strong><em>const Record = (props) =&gt; (<\/em><\/strong>\r\n<strong><em>&lt;tr&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;td&gt;{props.record.name}&lt;\/td&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;td&gt;{props.record.position}&lt;\/td&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;td&gt;{props.record.level}&lt;\/td&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;td&gt;<\/em><\/strong>\r\n<strong><em>  &lt;Link className=\"btn btn-link\" to={`\/edit\/${props.record._id}`}&gt;Edit&lt;\/Link&gt; |<\/em><\/strong>\r\n<strong><em>  &lt;button className=\"btn btn-link\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 onClick={() =&gt; {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 props.deleteRecord(props.record._id);<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 }}<\/em><\/strong>\r\n<strong><em>  &gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 Delete<\/em><\/strong>\r\n<strong><em>  &lt;\/button&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;\/td&gt;<\/em><\/strong>\r\n<strong><em>&lt;\/tr&gt;<\/em><\/strong>\r\n<strong><em>);<\/em><\/strong>\r\n<strong><em>export default function RecordList() {<\/em><\/strong>\r\n<strong><em>const [records, setRecords] = useState([]);<\/em><\/strong>\r\n<strong><em> \/\/ This method fetches the records from the database.<\/em><\/strong>\r\n<strong><em>useEffect(() =&gt; {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0async function getRecords() {<\/em><\/strong>\r\n<strong><em>  const response = await fetch(`http:\/\/localhost:5000\/record\/`);<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0if (!response.ok) {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 const message = `An error occurred: ${response.statusText}`;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 window.alert(message);<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 return;<\/em><\/strong>\r\n<strong><em>  }<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0const records = await response.json();<\/em><\/strong>\r\n<strong><em>  setRecords(records);<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0getRecords();<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0return;<\/em><\/strong>\r\n<strong><em>}, [records.length]);<\/em><\/strong>\r\n<strong><em> \/\/ This method will delete a record<\/em><\/strong>\r\n<strong><em>async function deleteRecord(id) {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0await fetch(`http:\/\/localhost:5000\/${id}`, {<\/em><\/strong>\r\n<strong><em>  method: \"DELETE\"<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0});<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0const newRecords = records.filter((el) =&gt; el._id !== id);<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0setRecords(newRecords);<\/em><\/strong>\r\n<strong><em>}<\/em><\/strong>\r\n<strong><em> \/\/ This method will map out the records on the table<\/em><\/strong>\r\n<strong><em>function recordList() {<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0return records.map((record) =&gt; {<\/em><\/strong>\r\n<strong><em>  return (<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;Record<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0record={record}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 deleteRecord={() =&gt; deleteRecord(record._id)}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 key={record._id}<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 \/&gt;<\/em><\/strong>\r\n<strong><em>  );<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0});<\/em><\/strong>\r\n<strong><em>}<\/em><\/strong>\r\n<strong><em> \/\/ This following section will display the table with the records of individuals.<\/em><\/strong>\r\n<strong><em>return (<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;div&gt;<\/em><\/strong>\r\n<strong><em>  &lt;h3&gt;Record List&lt;\/h3&gt;<\/em><\/strong>\r\n<strong><em>  &lt;table className=\"table table-striped\" style={{ marginTop: 20 }}&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;thead&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;tr&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;th&gt;Name&lt;\/th&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;th&gt;Position&lt;\/th&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;th&gt;Level&lt;\/th&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;th&gt;Action&lt;\/th&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0\u00a0\u00a0 &lt;\/tr&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;\/thead&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;tbody&gt;{recordList()}&lt;\/tbody&gt;<\/em><\/strong>\r\n<strong><em>  &lt;\/table&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;\/div&gt;<\/em><\/strong>\r\n<strong><em>);<\/em><\/strong>\r\n<strong><em>}<\/em><\/strong><\/pre>\n<h4><b>navbar.js<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">In the navbar.js component, we will create a navigation bar that links to the required components using the following code.<\/span><\/p>\n<pre><em><strong>import React from \"react\";<\/strong><\/em>\r\n<em><strong>\/\/ We import bootstrap to make our application look better.<\/strong><\/em>\r\n<em><strong>import \"bootstrap\/dist\/css\/bootstrap.css\";<\/strong><\/em>\r\n<em><strong>\/\/ We import NavLink to utilize the react router.<\/strong><\/em>\r\n<em><strong>import { NavLink } from \"react-router-dom\";<\/strong><\/em>\r\n<em><strong>\/\/ Here, we display our Navbar<\/strong><\/em>\r\n<em><strong>export default function Navbar() {<\/strong><\/em>\r\n<em><strong>return (<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0&lt;div&gt;<\/strong><\/em>\r\n<em><strong>  &lt;nav className=\"navbar navbar-expand-lg navbar-light bg-light\"&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0 &lt;NavLink className=\"navbar-brand\" to=\"\/\"&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0 &lt;img style={{\"width\" : 25 + '%'}} src=\"https:\/\/d3cy9zhslanhfa.cloudfront.net\/media\/3800C044-6298-4575-A05D5C6B7623EE37\/4B45D0EC-3482-4759-82DA37D8EA07D229\/webimage-8A27671A-8A53-45DC-89D7BF8537F15A0D.png\"&gt;&lt;\/img&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0 &lt;\/NavLink&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0 &lt;button<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0 className=\"navbar-toggler\"<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0 type=\"button\"<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0 data-toggle=\"collapse\"<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0 data-target=\"#navbarSupportedContent\"<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0 aria-controls=\"navbarSupportedContent\"<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0 aria-expanded=\"false\"<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0 aria-label=\"Toggle navigation\"<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0 &gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0 &lt;span className=\"navbar-toggler-icon\"&gt;&lt;\/span&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0 &lt;\/button&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;div className=\"collapse navbar-collapse\" id=\"navbarSupportedContent\"&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0 &lt;ul className=\"navbar-nav ml-auto\"&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;li className=\"nav-item\"&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;NavLink className=\"nav-link\" to=\"\/create\"&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Create Record<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/NavLink&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/li&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0\u00a0\u00a0 &lt;\/ul&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0 &lt;\/div&gt;<\/strong><\/em>\r\n<em><strong>  &lt;\/nav&gt;<\/strong><\/em>\r\n<em><strong> \u00a0\u00a0&lt;\/div&gt;<\/strong><\/em>\r\n<em><strong>);<\/strong><\/em>\r\n<em><strong>}<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">Now, add the following code to the <\/span><b><i>src\/App.js<\/i><\/b><span style=\"font-weight: 400;\"> file that we created earlier.<\/span><\/p>\n<pre><strong><em>import React from \"react\";<\/em><\/strong>\r\n<strong><em>\/\/ We use Route in order to define the different routes of our application<\/em><\/strong>\r\n<strong><em>import { Route, Routes } from \"react-router-dom\";<\/em><\/strong>\r\n<strong><em>\/\/ We import all the components we need in our app<\/em><\/strong>\r\n<strong><em>import Navbar from \".\/components\/navbar\";<\/em><\/strong>\r\n<strong><em>import RecordList from \".\/components\/recordList\";<\/em><\/strong>\r\n<strong><em>import Edit from \".\/components\/edit\";<\/em><\/strong>\r\n<strong><em>import Create from \".\/components\/create\";<\/em><\/strong>\r\n<strong><em>const App = () =&gt; {<\/em><\/strong>\r\n<strong><em>return (<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0&lt;div&gt;<\/em><\/strong>\r\n<strong><em>  &lt;Navbar \/&gt;<\/em><\/strong>\r\n<strong><em>  &lt;Routes&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;Route exact path=\"\/\" element={&lt;RecordList \/&gt;} \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;Route path=\"\/edit\/:id\" element={&lt;Edit \/&gt;} \/&gt;<\/em><\/strong>\r\n<strong><em> \u00a0\u00a0 &lt;Route path=\"\/create\" element={&lt;Create \/&gt;} \/&gt;<\/em><\/strong>\r\n<strong><em>  &lt;\/Routes&gt;<\/em><\/strong>\r\n<strong><em>\u00a0\u00a0\u00a0&lt;\/div&gt;<\/em><\/strong>\r\n<strong><em>);<\/em><\/strong>\r\n<strong><em>};<\/em><\/strong>\r\n<strong><em>export default App;<\/em><\/strong><\/pre>\n<h3><b>Step 10\u2014Testing<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">It looks like you have finished creating the necessary components, and have successfully connected your React application to the back end using the fetch method. This method provides a cleaner and simpler way to handle HTTP requests, which is used in create.js, edit.js, and recordList.js files to manage HTTP requests.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To start your application, please follow these steps: open a new terminal window and navigate to the \u2018server\u2019 directory. Then execute the following command:<\/span><\/p>\n<pre><strong><em>&gt; node server.js<\/em><\/strong><\/pre>\n<p><span style=\"font-weight: 400;\">Open a new terminal window in the <\/span><b><i>client<\/i><\/b><span style=\"font-weight: 400;\"> directory and run the following command:<\/span><\/p>\n<pre><em><strong>&gt; npm start<\/strong><\/em><\/pre>\n<p><span style=\"font-weight: 400;\">You should be able to view the application in your browser.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"MERN_Stack_Applications\"><\/span><b>MERN Stack Applications<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h4><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2363\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/3.png\" alt=\"Facebook logo\" width=\"975\" height=\"296\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/3.png 975w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/3-300x91.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/3-768x233.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/h4>\n<h3><b>1.<\/b><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><b>Facebook<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">One of the most famous examples of a MERN stack application is &#8220;<\/span><a href=\"https:\/\/www.facebook.com\/\"><span style=\"font-weight: 400;\">Facebook<\/span><\/a><span style=\"font-weight: 400;\">.&#8221; Facebook is a social media platform that utilizes the MERN stack for its web development. React is used for building the user interfaces, while Node.js, Express.js, and MongoDB work together on the server side to handle data storage, server logic, and API interactions. This combination of technologies has contributed to Facebook&#8217;s success in delivering a highly interactive and data-intensive web application, serving billions of users worldwide.<\/span><\/p>\n<h4><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2364 size-full\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/4.png\" alt=\"Instagram logo\" width=\"975\" height=\"548\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/4.png 975w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/4-300x169.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/4-768x432.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/h4>\n<h3><b>2.<\/b><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><b>Instagram<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Instagram is a prominent MERN stack application that focuses on photo and video sharing, as well as social networking. It utilizes MongoDB to store user data and media files efficiently. Express.js handles the routing and middleware, ensuring secure and smooth interactions between users and the platform. React, as the front-end library, plays a crucial role in creating a highly interactive and responsive user interface. This combination of MERN components allows Instagram to deliver features like real-time photo and video uploads, comments, likes, and a seamless user experience.<\/span><\/p>\n<h4><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2365\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/5.png\" alt=\"WhatsApp Logo\" width=\"975\" height=\"487\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/5.png 975w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/5-300x150.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/5-768x384.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/h4>\n<h3><b>3.<\/b><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><b>WhatsApp<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">WhatsApp, a widely-used messaging application, relies on the MERN stack for its web application. The stack enables real-time communication, ensuring instant message delivery and synchronization across devices. MongoDB serves as the data store for user messages and multimedia content. Express.js manages routes and handles API requests, allowing for secure message transmission. React plays a role in crafting an intuitive and user-friendly chat interface. The MERN stack is well-suited for managing vast volumes of real-time data and ensuring a reliable messaging experience.<\/span><\/p>\n<h4><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2366 size-full\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/6.png\" alt=\"Netflix logo\" width=\"975\" height=\"549\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/6.png 975w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/6-300x169.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/6-768x432.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/h4>\n<h3><b>4.<\/b><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><b>Netflix<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Netflix, a leading streaming platform, chooses React for building its user interfaces. This selection of React enables Netflix to provide a responsive, user-friendly experience to its subscribers. The React library allows for the creation of dynamic and interactive user interfaces, ensuring that users can seamlessly navigate the vast library of content, personalize their viewing experience, and enjoy high-quality streaming. While Netflix doesn&#8217;t utilize all MERN components, React, as part of the MERN stack, contributes to an engaging and visually appealing user interface.<\/span><\/p>\n<h4><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2367 size-full\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/7.png\" alt=\"Airbnb logo\" width=\"975\" height=\"444\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/7.png 975w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/7-300x137.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/7-768x350.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/h4>\n<h3><b>5.<\/b><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><b>Airbnb<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Airbnb, a global online marketplace for lodging and travel, employs the MERN stack for its web development. React is instrumental in creating the user interface, which allows users to search, view, and book accommodations worldwide. Node.js and Express.js power the server-side, handling user requests and database interactions efficiently. MongoDB stores a vast amount of listing and user data. A vacation rental<\/span><a href=\"https:\/\/www.technbrains.com\/blog\/how-to-make-an-app-like-airbnb\/\"> <span style=\"font-weight: 400;\">app like Airbnb<\/span><\/a><span style=\"font-weight: 400;\"> showcases the scalability of the MERN stack, enabling millions of property listings and facilitating bookings across different regions, all while delivering a user-friendly and intuitive experience.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">These MERN Stack applications underscore the versatility and scalability of the MERN stack. Whether it&#8217;s managing multimedia content, facilitating real-time messaging, providing streaming services, or offering a global travel marketplace, the MERN stack&#8217;s combination of MongoDB, Express.js, React, and Node.js contributes to the success and user engagement of these high-performance web platforms, which cater to millions or even billions of users worldwide.<\/span><\/p>\n<h4><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2368\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/8.png\" alt=\"The 5 Spheres of Fit - MERN Stack App\" width=\"350\" height=\"301\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/8.png 469w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/8-300x258.png 300w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/h4>\n<h3><b>6.<\/b><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><b>5 Spheres of Fit &#8211; MERN Stack App<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The 5 Spheres of Fit app, developed by TechnBrains in the wellness industry, embodies a holistic approach to wellness. In line with its mission to enhance fitness and overall life wellness, the app has been meticulously crafted using cutting-edge technologies and services. TechnBrains tackled various challenges, such as data security, user engagement, content curation, interdisciplinary expertise, and monetization strategy, to create a robust and user-friendly platform. It focuses on five key areas:<\/span><\/p>\n<h4><b>Physical<\/b><\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2369 size-full\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/9.png\" alt=\"MERN stack app interface 1\" width=\"975\" height=\"500\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/9.png 975w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/9-300x154.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/9-768x394.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/p>\n<h4><b>Mental<\/b><\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2370 size-full\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/10.png\" alt=\"MERN stack app interface 2\" width=\"975\" height=\"503\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/10.png 975w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/10-300x155.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/10-768x396.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/p>\n<h4><b>Social<\/b><\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2371 size-full\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/11.png\" alt=\"MERN stack app interface 3\" width=\"975\" height=\"502\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/11.png 975w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/11-300x154.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/11-768x395.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/p>\n<h4><b>Financial<\/b><\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2372 size-full\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/12.png\" alt=\"MERN stack application interface 4\" width=\"975\" height=\"501\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/12.png 975w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/12-300x154.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/12-768x395.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/p>\n<h4><b>Educational spheres<\/b><\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2373 size-full\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/13.png\" alt=\"MERN stack application interface 5\" width=\"975\" height=\"502\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/13.png 975w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/13-300x154.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/13-768x395.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/p>\n<h2><a href=\"https:\/\/www.technbrains.com\/contact-us\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2397 size-full\" src=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/Artboard-\u2013-91.png\" alt=\"cta banner\" width=\"770\" height=\"200\" srcset=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/Artboard-\u2013-91.png 770w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/Artboard-\u2013-91-300x78.png 300w, https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/Artboard-\u2013-91-768x199.png 768w\" sizes=\"auto, (max-width: 770px) 100vw, 770px\" \/><\/a><\/h2>\n<h2><span class=\"ez-toc-section\" id=\"Wrapping_it_up\"><\/span><b>Wrapping it up<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">In this comprehensive guide, we&#8217;ve explored the MERN stack, its components, and the benefits it offers for web development. By following the steps outlined in this guide, you can create your own MERN-based projects and build high-performance web applications. Whether you&#8217;re a beginner or an experienced developer, or looking to<\/span><a href=\"https:\/\/www.technbrains.com\/services\/hire-developer\/\"> <span style=\"font-weight: 400;\">hire app developers<\/span><\/a><span style=\"font-weight: 400;\"> mastering the MERN stack is a valuable skill that can open up a world of possibilities in web development. Good luck with your MERN journey!<\/span><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Content<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#What_Is_MERN_Stack\" >What Is MERN Stack?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#Express_JS\" >Express JS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#JavaScript_and_MERN_Stack\" >JavaScript and MERN Stack<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#Benefits_of_Using_MERN_Stack\" >Benefits of Using MERN Stack<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#Key_Components_of_MERN_Stack\" >Key Components of MERN Stack<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#Setting_Up_Your_MERN_Stack_Development_Environment\" >Setting Up Your MERN Stack Development Environment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#Building_Your_First_MERN_Stack_Application\" >Building Your First MERN Stack Application<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#MERN_Stack_Applications\" >MERN Stack Applications<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#Wrapping_it_up\" >Wrapping it up<\/a><\/li><\/ul><\/nav><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you are a software developer, you must have heard of the LAMP stack that comprises Linux, Apache, MySQL and PHP. These are open-source components that allow developers to build dynamic websites and web applications. However, in recent years, MERN stack has gained popularity as a development stack that is used to create scalable web [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":2355,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[208,209,210],"class_list":["post-2354","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-app","tag-mern-stack-application","tag-mern-stack","tag-mern-stack-app-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to develop a MERN Stack Application | Technbrains Blog<\/title>\n<meta name=\"description\" content=\"Learn step-by-step how to build a powerful MERN stack application. Our comprehensive guide will take you from concept to deployment.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to develop a MERN Stack Application: A Comprehensive Guide\" \/>\n<meta property=\"og:description\" content=\"Learn step-by-step how to build a powerful MERN stack application. Our comprehensive guide will take you from concept to deployment.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/category\/Software-Company\/Technbrains-100478948441594\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-13T23:12:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-17T01:26:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/02-\u2013-54.png\" \/>\n\t<meta property=\"og:image:width\" content=\"945\" \/>\n\t<meta property=\"og:image:height\" content=\"491\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Samantha Jones\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@technbrains\" \/>\n<meta name=\"twitter:site\" content=\"@technbrains\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Samantha Jones\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/\"},\"author\":{\"name\":\"Samantha Jones\",\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/#\\\/schema\\\/person\\\/fc0bcf85c722a880f219a88947cfc285\"},\"headline\":\"How to develop a MERN Stack Application: A Comprehensive Guide\",\"datePublished\":\"2023-11-13T23:12:40+00:00\",\"dateModified\":\"2023-11-17T01:26:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/\"},\"wordCount\":3710,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/02-\u2013-54.png\",\"keywords\":[\"MERN Stack Application\",\"MERN stack\",\"MERN stack app development\"],\"articleSection\":[\"App\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/\",\"url\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/\",\"name\":\"How to develop a MERN Stack Application | Technbrains Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/02-\u2013-54.png\",\"datePublished\":\"2023-11-13T23:12:40+00:00\",\"dateModified\":\"2023-11-17T01:26:25+00:00\",\"description\":\"Learn step-by-step how to build a powerful MERN stack application. Our comprehensive guide will take you from concept to deployment.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/02-\u2013-54.png\",\"contentUrl\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/02-\u2013-54.png\",\"width\":945,\"height\":491,\"caption\":\"How to develop a MERN Stack Application\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/how-to-develop-a-mern-stack-application\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to develop a MERN Stack Application: A Comprehensive Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/\",\"name\":\"Latest Technology Blog | TechnBrains\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/#organization\"},\"alternateName\":\"TechnBrains\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/#organization\",\"name\":\"TechnBrains\",\"alternateName\":\"TechnBrains\",\"url\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/logo.png\",\"width\":266,\"height\":52,\"caption\":\"TechnBrains\"},\"image\":{\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/pages\\\/category\\\/Software-Company\\\/Technbrains-100478948441594\\\/\",\"https:\\\/\\\/x.com\\\/technbrains\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/technbrains\",\"https:\\\/\\\/www.instagram.com\\\/technbrains\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCPGC1b8B-ldUUPa6lEUA-qg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/#\\\/schema\\\/person\\\/fc0bcf85c722a880f219a88947cfc285\",\"name\":\"Samantha Jones\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d7e9056a6c17289678a7c00c17192d982ee766379571949615f74bebdefbed9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d7e9056a6c17289678a7c00c17192d982ee766379571949615f74bebdefbed9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4d7e9056a6c17289678a7c00c17192d982ee766379571949615f74bebdefbed9?s=96&d=mm&r=g\",\"caption\":\"Samantha Jones\"},\"sameAs\":[\"https:\\\/\\\/blog.technbrains.com\\\/blog\"],\"url\":\"https:\\\/\\\/www.technbrains.com\\\/blog\\\/author\\\/samantha\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to develop a MERN Stack Application | Technbrains Blog","description":"Learn step-by-step how to build a powerful MERN stack application. Our comprehensive guide will take you from concept to deployment.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/","og_locale":"en_US","og_type":"article","og_title":"How to develop a MERN Stack Application: A Comprehensive Guide","og_description":"Learn step-by-step how to build a powerful MERN stack application. Our comprehensive guide will take you from concept to deployment.","og_url":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/","article_publisher":"https:\/\/www.facebook.com\/pages\/category\/Software-Company\/Technbrains-100478948441594\/","article_published_time":"2023-11-13T23:12:40+00:00","article_modified_time":"2023-11-17T01:26:25+00:00","og_image":[{"width":945,"height":491,"url":"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/02-\u2013-54.png","type":"image\/png"}],"author":"Samantha Jones","twitter_card":"summary_large_image","twitter_creator":"@technbrains","twitter_site":"@technbrains","twitter_misc":{"Written by":"Samantha Jones","Est. reading time":"19 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#article","isPartOf":{"@id":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/"},"author":{"name":"Samantha Jones","@id":"https:\/\/www.technbrains.com\/blog\/#\/schema\/person\/fc0bcf85c722a880f219a88947cfc285"},"headline":"How to develop a MERN Stack Application: A Comprehensive Guide","datePublished":"2023-11-13T23:12:40+00:00","dateModified":"2023-11-17T01:26:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/"},"wordCount":3710,"commentCount":0,"publisher":{"@id":"https:\/\/www.technbrains.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#primaryimage"},"thumbnailUrl":"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/02-\u2013-54.png","keywords":["MERN Stack Application","MERN stack","MERN stack app development"],"articleSection":["App"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/","url":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/","name":"How to develop a MERN Stack Application | Technbrains Blog","isPartOf":{"@id":"https:\/\/www.technbrains.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#primaryimage"},"image":{"@id":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#primaryimage"},"thumbnailUrl":"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/02-\u2013-54.png","datePublished":"2023-11-13T23:12:40+00:00","dateModified":"2023-11-17T01:26:25+00:00","description":"Learn step-by-step how to build a powerful MERN stack application. Our comprehensive guide will take you from concept to deployment.","breadcrumb":{"@id":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#primaryimage","url":"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/02-\u2013-54.png","contentUrl":"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/11\/02-\u2013-54.png","width":945,"height":491,"caption":"How to develop a MERN Stack Application"},{"@type":"BreadcrumbList","@id":"https:\/\/www.technbrains.com\/blog\/how-to-develop-a-mern-stack-application\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.technbrains.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to develop a MERN Stack Application: A Comprehensive Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.technbrains.com\/blog\/#website","url":"https:\/\/www.technbrains.com\/blog\/","name":"Latest Technology Blog | TechnBrains","description":"","publisher":{"@id":"https:\/\/www.technbrains.com\/blog\/#organization"},"alternateName":"TechnBrains","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.technbrains.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.technbrains.com\/blog\/#organization","name":"TechnBrains","alternateName":"TechnBrains","url":"https:\/\/www.technbrains.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.technbrains.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/06\/logo.png","contentUrl":"https:\/\/www.technbrains.com\/blog\/wp-content\/uploads\/2023\/06\/logo.png","width":266,"height":52,"caption":"TechnBrains"},"image":{"@id":"https:\/\/www.technbrains.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pages\/category\/Software-Company\/Technbrains-100478948441594\/","https:\/\/x.com\/technbrains","https:\/\/www.linkedin.com\/company\/technbrains","https:\/\/www.instagram.com\/technbrains\/","https:\/\/www.youtube.com\/channel\/UCPGC1b8B-ldUUPa6lEUA-qg"]},{"@type":"Person","@id":"https:\/\/www.technbrains.com\/blog\/#\/schema\/person\/fc0bcf85c722a880f219a88947cfc285","name":"Samantha Jones","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4d7e9056a6c17289678a7c00c17192d982ee766379571949615f74bebdefbed9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4d7e9056a6c17289678a7c00c17192d982ee766379571949615f74bebdefbed9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d7e9056a6c17289678a7c00c17192d982ee766379571949615f74bebdefbed9?s=96&d=mm&r=g","caption":"Samantha Jones"},"sameAs":["https:\/\/blog.technbrains.com\/blog"],"url":"https:\/\/www.technbrains.com\/blog\/author\/samantha\/"}]}},"_links":{"self":[{"href":"https:\/\/www.technbrains.com\/blog\/wp-json\/wp\/v2\/posts\/2354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.technbrains.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.technbrains.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.technbrains.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.technbrains.com\/blog\/wp-json\/wp\/v2\/comments?post=2354"}],"version-history":[{"count":13,"href":"https:\/\/www.technbrains.com\/blog\/wp-json\/wp\/v2\/posts\/2354\/revisions"}],"predecessor-version":[{"id":2398,"href":"https:\/\/www.technbrains.com\/blog\/wp-json\/wp\/v2\/posts\/2354\/revisions\/2398"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.technbrains.com\/blog\/wp-json\/wp\/v2\/media\/2355"}],"wp:attachment":[{"href":"https:\/\/www.technbrains.com\/blog\/wp-json\/wp\/v2\/media?parent=2354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.technbrains.com\/blog\/wp-json\/wp\/v2\/categories?post=2354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.technbrains.com\/blog\/wp-json\/wp\/v2\/tags?post=2354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}