{"id":87803,"date":"2023-06-12T10:06:12","date_gmt":"2023-06-12T04:36:12","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=87803"},"modified":"2023-06-12T10:06:12","modified_gmt":"2023-06-12T04:36:12","slug":"express-framework-nodejs","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/","title":{"rendered":"Node.js Express Framework"},"content":{"rendered":"<p>Express is a popular open-source web application framework for Node.js, used to build server-side web applications. It provides a simple and flexible API for building web applications, allowing developers to create high-performance and scalable web applications with ease.<\/p>\n<p>Express was first released in 2010 and has since become one of the most widely used frameworks for Node.js. It has a large and active community of developers, and a vast ecosystem of modules and tools that can be used to extend its capabilities.<\/p>\n<h3>Key Features of Express<\/h3>\n<p><strong>1. Middleware:<\/strong> Express provides middleware, which are functions that can be executed during the request-response cycle of an HTTP request. Middleware functions can be used to modify the request or response objects, perform authentication or validation, or handle errors.<\/p>\n<p><strong>2. Routing:<\/strong> Express provides a simple and flexible routing system that allows developers to define routes for different HTTP methods and URLs. Route handlers can be used to handle requests and send responses.<\/p>\n<p><strong>3. Template Engines:<\/strong> Express supports multiple template engines such as Pug, EJS, and Handlebars, which allow developers to easily generate HTML pages with dynamic content.<\/p>\n<p><strong>4. Error Handling:<\/strong> Express provides a robust error-handling mechanism that allows developers to handle errors in a central location and provide appropriate responses to clients.<\/p>\n<h3>Installing Express<\/h3>\n<p>To get started with Express, we need to install it as a dependency in our Node.js project. We can do this using the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">npm install express<\/pre>\n<p>Once we have installed Express, we can create a new Express application by creating a new JavaScript file and importing the Express module.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const express = require('express');\nconst app = express();<\/pre>\n<p>In the above code, we import the Express module and create a new Express application instance. We can then define routes for the application using the HTTP methods (GET, POST, PUT, DELETE) and the \u2018app\u2019 instance.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">app.get('\/', (req, res) =&gt; {\n  res.send('Hello World!');\n});\n<\/pre>\n<p>In the above code, we define a route for the root URL (\/) using the \u2018get\u2019 method of the \u2018app\u2019 instance. When a client sends a GET request to the root URL, the route handler function will be executed, and the response will be sent with the message &#8220;Hello World!&#8221;.<\/p>\n<p>We can start the Express application by listening for incoming HTTP requests on a specific port using the \u2018listen\u2019 method of the \u2018app\u2019 instance.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">app.listen(3000, () =&gt; {\n  console.log('Server started on port 3000');\n});\n<\/pre>\n<p>In the above code, we start the Express application on port 3000 and log a message to the console when the server is started.<\/p>\n<h3>Request &amp; Response<\/h3>\n<p><strong>Request:<\/strong> A request is a message sent by a client to a server, requesting a specific action to be performed. In the context of web applications, an HTTP request is commonly used. An HTTP request consists of several components:<\/p>\n<p><strong>1. HTTP Method:<\/strong> It specifies the type of action to be performed on the server. The most commonly used methods are:<\/p>\n<ul>\n<li><strong>GET:<\/strong>\u00a0Retrieves a resource from the server.<\/li>\n<li><strong>POST:<\/strong> Sends data to the server to create a new resource.<\/li>\n<li><strong>PUT:<\/strong> Updates an existing resource on the server.<\/li>\n<li><strong>DELETE:<\/strong> Removes a resource from the server.<\/li>\n<\/ul>\n<p><strong>2. URL (Uniform Resource Locator):<\/strong> It identifies the location of the resource on the server that the client wants to interact with. For example, https:\/\/example.com\/api\/users.<\/p>\n<p><strong>3. Headers:<\/strong> Headers contain additional information about the request, such as the client&#8217;s user agent, content type, or authorization credentials.<\/p>\n<p><strong>4. Body (optional):<\/strong> In some cases, a request may include a body that contains data to be sent to the server. This is commonly used in POST or PUT requests to send data for creating or updating a resource.<\/p>\n<p>Once a server receives a request, it processes it and generates a response.<\/p>\n<p><strong>Response:<\/strong> A response is a message sent by a server to a client in response to a request. Like requests, HTTP responses consist of several components:<\/p>\n<p><strong>1. Status Code:<\/strong> It indicates the outcome of the request. Common HTTP status codes include:<\/p>\n<ul>\n<li><strong>200 OK:<\/strong> The request was successful.<\/li>\n<li><strong>404 Not Found:<\/strong> The requested resource could not be found.<\/li>\n<li><strong>500 Internal Server Error:<\/strong> An error occurred on the server while processing the request.<\/li>\n<\/ul>\n<p><strong>2. Headers:<\/strong> Similar to request headers, response headers provide additional information about the response, such as the content type or caching instructions.<\/p>\n<p><strong>3. Body:<\/strong> The response body contains the data returned by the server. This can be HTML, JSON, XML, or any other format based on the request and the server&#8217;s functionality.<\/p>\n<p>The client receives the response and processes it accordingly. For example, in a web browser, the response may be used to render a web page or update the client&#8217;s user interface.<\/p>\n<h3>Basic Routing<\/h3>\n<p>Basic routing is a key feature of web frameworks like Express, where you can define routes to handle different HTTP methods and URLs. Let&#8217;s explore how routing works in Express and provide some example code.<\/p>\n<p>In Express, you can define routes using the \u2018app\u2019 object, which represents your Express application. Here&#8217;s an example of defining a basic route:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const express = require('express');\nconst app = express();\n \n\/\/ Define a route for the root URL\napp.get('\/', (req, res) =&gt; {\n  res.send('Hello World!');\n});\n \n\/\/ Start the server\napp.listen(3000, () =&gt; {\n  console.log('Server started on port 3000');\n});\n<\/pre>\n<p>In the above code, we import the Express module and create an Express application instance using \u2018express()\u2019. Then, we define a route for the root URL (\u2018\/\u2019) using the \u2018get\u2019 method of the \u2018app\u2019 object. When a client sends a GET request to the root URL, the route handler function is executed, and the response is sent with the message &#8220;Hello World!&#8221;.<\/p>\n<p>You can define routes for other HTTP methods like \u2018POST\u2019, \u2018PUT\u2019, or \u2018DELETE\u2019 in a similar way:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Define a route for handling a POST request\napp.post('\/users', (req, res) =&gt; {\n  \/\/ Handle the request and send a response\n  res.send('User created successfully!');\n});\n \n\/\/ Define a route for handling a PUT request\napp.put('\/users\/:id', (req, res) =&gt; {\n  const userId = req.params.id;\n  \/\/ Handle the request and send a response\n  res.send(`User ${userId} updated successfully!`);\n});\n \n\/\/ Define a route for handling a DELETE request\napp.delete('\/users\/:id', (req, res) =&gt; {\n  const userId = req.params.id;\n  \/\/ Handle the request and send a response\n  res.send(`User ${userId} deleted successfully!`);\n});\n<\/pre>\n<p>In the above code, we define routes for creating, updating, and deleting users. The :id in the URL represents a route parameter, allowing you to access dynamic values from the URL using \u2018req.params\u2019.<br \/>\nYou can also define routes with multiple callback functions or middleware for more complex scenarios:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">app.get('\/users\/:id', (req, res, next) =&gt; {\n  \/\/ Middleware function 1\n  \/\/ Perform some operations on the request\n  console.log('Middleware 1');\n \n  \/\/ Call the next middleware or route handler\n  next();\n}, (req, res) =&gt; {\n  \/\/ Middleware function 2\n  \/\/ Handle the request and send a response\n  const userId = req.params.id;\n  res.send(`User ${userId} retrieved successfully!`);\n});\n<\/pre>\n<p>In this example, we define a route with two middleware functions. The first middleware function performs some operations on the request (e.g., logging), and then calls the next function to pass the control to the next middleware or route handler. Finally, the second middleware function handles the request and sends a response.<\/p>\n<h3>Serving Static Files<\/h3>\n<p>Serving static files is a common requirement in web applications, where you need to serve files such as HTML, CSS, JavaScript, images, or other static assets to clients. Express provides a built-in middleware called \u2018express.static\u2019 that makes it easy to serve static files. Let&#8217;s explore how to serve static files in Express.<\/p>\n<p>First, you need to create a directory in your project where you will store your static files. For example, you can create a folder named &#8220;public&#8221; in your project&#8217;s root directory.<\/p>\n<p>Inside the &#8220;public&#8221; folder, you can place your static files. For instance, you may have an HTML file called &#8220;index.html&#8221;, a CSS file called &#8220;styles.css&#8221;, and an image file called &#8220;logo.png&#8221;.<\/p>\n<p>To serve these static files, you can use the \u2018express.static\u2019 middleware in your Express application. Here&#8217;s an example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const express = require('express');\nconst app = express();\n \n\/\/ Serve static files from the \"public\" directory\napp.use(express.static('public'));\n \n\/\/ Start the server\napp.listen(3000, () =&gt; {\n  console.log('Server started on port 3000');\n});\n<\/pre>\n<p>In the above code, we use the \u2018app.use\u2019 function to register the \u2018express.static\u2019 middleware. We pass the path to the directory containing the static files as an argument. In this case, we specify &#8216;public&#8217; as the directory name. This means that any files in the &#8220;public&#8221; directory can be accessed by clients.<\/p>\n<p>Now, if you have an HTML file called &#8220;index.html&#8221; in the &#8220;public&#8221; directory, it can be accessed by visiting \u2018http:\/\/localhost:3000\/index.html\u2019 in your browser.<\/p>\n<p>Similarly, if you have a CSS file called &#8220;styles.css&#8221; in the &#8220;public&#8221; directory, it can be referenced in your HTML file using a relative path like \u2018&lt;link rel=&#8221;stylesheet&#8221; href=&#8221;\/styles.css&#8221;&gt;\u2019.<\/p>\n<p>The \u2018express.static\u2019 middleware takes care of mapping URLs to the corresponding files in the specified directory. It automatically serves the appropriate file to the client based on the requested URL.<\/p>\n<h3>GET And POST Methods<\/h3>\n<p><strong>GET Method:<\/strong> The GET method is one of the most commonly used HTTP methods. It is used to retrieve data from a server by sending a request. When a client sends a GET request, it specifies the resource it wants to retrieve from the server. This method is considered &#8220;safe&#8221; as it should not have any side effects on the server.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Example code for handling a GET request in Express:\nconst express = require('express');\nconst app = express();\n \n\/\/ Define a route for handling a GET request\napp.get('\/users', (req, res) =&gt; {\n  \/\/ Retrieve user data from a database or another source\n  const users = [\n    { id: 1, name: 'John' },\n    { id: 2, name: 'Jane' },\n  ];\n \n  \/\/ Send the users as a response\n  res.json(users);\n});\n \n\/\/ Start the server\napp.listen(3000, () =&gt; {\n  console.log('Server started on port 3000');\n});\n<\/pre>\n<p>In the above code, we define a route using the \u2018app.get\u2019 method to handle a GET request to the &#8216;\/users&#8217; URL. When the client sends a GET request to this route, the route handler function is executed, and the server responds by sending an array of user data in JSON format.<\/p>\n<p><strong>POST Method:<\/strong> The POST method is used to submit data to the server to create or update a resource. When a client sends a POST request, it includes data in the request body that will be processed by the server. This method can have side effects on the server, such as creating a new record in a database.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Example code for handling a POST request in Express:\nconst express = require('express');\nconst app = express();\n \n\/\/ Parse JSON data in the request body\napp.use(express.json());\n \n\/\/ Define a route for handling a POST request\napp.post('\/users', (req, res) =&gt; {\n  const { name, email } = req.body;\n \n  \/\/ Process the data and create a new user\n  \/\/ Save the user to a database or perform other operations\n \n  \/\/ Send a success message as a response\n  res.send('User created successfully!');\n});\n \n\/\/ Start the server\napp.listen(3000, () =&gt; {\n  console.log('Server started on port 3000');\n});\n<\/pre>\n<p>In the above code, we use the \u2018app.post\u2019 method to define a route for handling a POST request to the &#8216;\/users&#8217; URL. We also use the \u2018express.json\u2019 middleware to parse the JSON data in the request body. When the client sends a POST request to this route, the route handler function is executed. It accesses the data from the request body and performs the necessary operations, such as creating a new user in a database. Finally, the server responds with a success message.<\/p>\n<p>By using the GET and POST methods in Express, you can handle different types of client requests and perform appropriate actions on the server, such as retrieving data or creating new resources.<\/p>\n<h3>Cookies Management<\/h3>\n<p>Cookies are a widely used mechanism for managing state and maintaining user session information in web applications. In Express, you can easily handle cookies using the \u2018cookie-parser\u2019 middleware and the \u2018res.cookie\u2019 method. Let&#8217;s explain cookies management and provide an example code snippet.<br \/>\nFirst, you need to install the \u2018cookie-parser\u2019 package by running the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">npm install cookie-parser<\/pre>\n<p>Once you have installed \u2018cookie-parser\u2019, you can use it in your Express application as middleware. Here&#8217;s an example:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">const express = require('express');\nconst cookieParser = require('cookie-parser');\nconst app = express();\n \n\/\/ Use the cookieParser middleware\napp.use(cookieParser());\n \n\/\/ Define a route for setting a cookie\napp.get('\/set-cookie', (req, res) =&gt; {\n  \/\/ Set a cookie with a name and value\n  res.cookie('username', 'John');\n \n  \/\/ Send a response\n  res.send('Cookie set successfully!');\n});\n \n\/\/ Define a route for retrieving the cookie\napp.get('\/get-cookie', (req, res) =&gt; {\n  \/\/ Retrieve the value of the cookie\n  const username = req.cookies.username;\n \n  \/\/ Send the value as a response\n  res.send(`Username: ${username}`);\n});\n \n\/\/ Start the server\napp.listen(3000, () =&gt; {\n  console.log('Server started on port 3000');\n});\n<\/pre>\n<p>In the above code, we first import the cookie-parser middleware and use it with \u2018app.use\u2019 to enable cookie parsing for incoming requests.<\/p>\n<p>Next, we define a route for setting a cookie using the \u2018res.cookie\u2019 method. Inside the route handler, we call \u2018res.cookie\u2019 with the name and value of the cookie we want to set. In this example, we set a cookie named &#8216;username&#8217; with the value &#8216;John&#8217;.<\/p>\n<p>To retrieve the value of the cookie, we define another route for retrieving the cookie. In the route handler, we access the value of the &#8216;username&#8217; cookie using \u2018req.cookies\u2019.username and send it as a response.<br \/>\nWhen a client visits the &#8216;\/set-cookie&#8217; route, the server sets the &#8216;username&#8217; cookie with the value &#8216;John&#8217;. The client&#8217;s browser stores this cookie. Then, when the client visits the &#8216;\/get-cookie&#8217; route, the server retrieves the value of the &#8216;username&#8217; cookie and sends it back as a response.<\/p>\n<p>This is a basic example of how to manage cookies in Express. You can set additional options for cookies, such as expiration time, domain, and secure flag, by passing an options object as the third argument to res.cookie.<\/p>\n<h3>Conclusion<\/h3>\n<p>Express is a powerful and flexible web application framework for Node.js that provides a wide range of features and capabilities for building high-performance web applications. With its simple API, middleware, routing, template engines, and error-handling mechanisms, developers can quickly and easily create scalable and maintainable web applications with Express.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Express is a popular open-source web application framework for Node.js, used to build server-side web applications. It provides a simple and flexible API for building web applications, allowing developers to create high-performance and scalable&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":87805,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4984],"tags":[5055],"class_list":["post-87803","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-node-js-tutorials","tag-node-js-express-framework"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Node.js Express Framework - TechVidvan<\/title>\n<meta name=\"description\" content=\"Express is a powerful framework for Node.js for building high-performance web applications. Learn more about it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Node.js Express Framework - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Express is a powerful framework for Node.js for building high-performance web applications. Learn more about it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-12T04:36:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/05\/node-js-express-framework.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Node.js Express Framework - TechVidvan","description":"Express is a powerful framework for Node.js for building high-performance web applications. Learn more about it.","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:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/","og_locale":"en_US","og_type":"article","og_title":"Node.js Express Framework - TechVidvan","og_description":"Express is a powerful framework for Node.js for building high-performance web applications. Learn more about it.","og_url":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2023-06-12T04:36:12+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/05\/node-js-express-framework.webp","type":"image\/webp"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Node.js Express Framework","datePublished":"2023-06-12T04:36:12+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/"},"wordCount":1883,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/05\/node-js-express-framework.webp","keywords":["Node.js Express Framework"],"articleSection":["Node Js Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/","url":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/","name":"Node.js Express Framework - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/05\/node-js-express-framework.webp","datePublished":"2023-06-12T04:36:12+00:00","description":"Express is a powerful framework for Node.js for building high-performance web applications. Learn more about it.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/05\/node-js-express-framework.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/05\/node-js-express-framework.webp","width":1200,"height":628,"caption":"node js express framework"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/express-framework-nodejs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Node.js Express Framework"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/87803","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=87803"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/87803\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/87805"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=87803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=87803"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=87803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}