{"id":6402,"date":"2020-12-18T18:07:59","date_gmt":"2020-12-18T18:07:59","guid":{"rendered":"http:\/\/ismiletechnologies.com\/?p=6402"},"modified":"2023-01-14T17:58:49","modified_gmt":"2023-01-14T12:28:49","slug":"handling-middlewares-and-using-callbacks-in-expressjs","status":"publish","type":"post","link":"https:\/\/ismiletechnologies.com\/en_us\/dataops\/handling-middlewares-and-using-callbacks-in-expressjs\/","title":{"rendered":"Handling middlewares and using callbacks in ExpressJs"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"6402\" class=\"elementor elementor-6402\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-edf92de elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"edf92de\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-61525f7\" data-id=\"61525f7\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6963a39 elementor-widget elementor-widget-text-editor\" data-id=\"6963a39\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>ExpressJs is a javascript framework that is used with NodeJs mainly for web and mobile applications. This goes with saying that express.js is used for building web or mobile backend services and served through routes.<\/p><p>It is widely used by NodeJs backend developers and has a plethora of methods available to be used, and seeing that it is fast and unopinionated, you can build a large variety of applications that scales easily.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6b9b411 elementor-widget elementor-widget-heading\" data-id=\"6b9b411\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Prerequisites<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-27142ad elementor-widget elementor-widget-text-editor\" data-id=\"27142ad\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<ul><li>A basic knowledge of Javascript and NodeJs<\/li><li>NodeJs is already installed on your system You can install by going to node.js site<\/li><li>Initialised node project to test the given examples and practice.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9137765 elementor-widget elementor-widget-heading\" data-id=\"9137765\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">If you haven\u2019t initialised a project:<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d9fd47b elementor-widget elementor-widget-text-editor\" data-id=\"d9fd47b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<ul><li>Create a folder by using the UI or from the cmd run mkdir new-folder in the directory you wish to save the folder.<\/li><li>Change the directory to the new folder\u2019s directory with cd new-folder. Normally you should use a name that reflect the project you want to create, but we\u2019ll use new-folder in this article.<\/li><li>Inside the new folder, in the cmd run npm init -y. The -y flag help say yes to all the prompt making it a bit faster. A package.json is created on initialization.<\/li><li>Edit the package.json by adding \u201cstart\u201d: \u201cnode server.js\u201d right below the test script, divided by a comma. This goes to tell the cmd\/bash to run the codes in the file we\u2019re to create with node.js. So each time we want to run our program in server.js we just run npm run start in the cmd.<\/li><li>Now create a file named server.js in the new-folder manually or through bash touch server.js<\/li><li>ExpressJs is installed in your project You can do that by running npm install express \u2013save using the node package manager. Check express for more details.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1f666e4 elementor-widget-divider--view-line elementor-widget elementor-widget-divider\" data-id=\"1f666e4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"divider.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-divider\">\n\t\t\t<span class=\"elementor-divider-separator\">\n\t\t\t\t\t\t<\/span>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d13cdfa elementor-widget elementor-widget-heading\" data-id=\"d13cdfa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Middlewares<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b3766d8 elementor-widget elementor-widget-text-editor\" data-id=\"b3766d8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>So what are middlewares? <br \/>Middlewares are basically functions but these function have access to the request object, the response object and the next middleware. The next middleware is an inbuilt middleware that helps pass on the execution of a request from one middleware to another, thus giving way for the possibility of more than one middleware attached to a particular stack, we could also call the next a callback function. The response object is the object express returns to the client and is usually modified before sent. The request object is the object received from the client side and contains different kinds of information to be accessed and processed.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-ad8dfd8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ad8dfd8\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;gradient&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-ac1bdec\" data-id=\"ac1bdec\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4177fa8 elementor-widget elementor-widget-heading\" data-id=\"4177fa8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Need help for your next project?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-087199c elementor-widget elementor-widget-text-editor\" data-id=\"087199c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Get in touch with our experts for help.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-68a8544 elementor-align-left elementor-mobile-align-left elementor-tablet-align-left elementor-widget elementor-widget-button\" data-id=\"68a8544\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-xs\" href=\"#elementor-action%3Aaction%3Dpopup%3Aopen%26settings%3DeyJpZCI6IjI5OTEiLCJ0b2dnbGUiOmZhbHNlfQ%3D%3D\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Talk to our experts<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-012aa11 elementor-widget elementor-widget-heading\" data-id=\"012aa11\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">We have different types of middlewares and their use cases:<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-76ceda0 elementor-widget elementor-widget-heading\" data-id=\"76ceda0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Built-in middlewares<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d38b0e2 elementor-widget elementor-widget-text-editor\" data-id=\"d38b0e2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>These middlewares already exist in express.js for our usage. An example is the express.json which parses incoming requests to json, helping us to access the body which is parsed in json in the client side. Another popular example is the express.static, this middleware helps serve static files like css, js, html, etc. How do we use middlewares? You use the by calling the use function from an initialised express object.<\/p><p>An example is app.use(express.json()).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bb4a203 elementor-widget elementor-widget-heading\" data-id=\"bb4a203\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Third-party middleware<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-73c40c7 elementor-widget elementor-widget-text-editor\" data-id=\"73c40c7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>I decided to talk about this next because it is the next most used. Some very good people build packages that we want to use in our application to make it easier to build than creating from scratch. We could add them as a middleware if we want express to use them each time a client sends a request as they attach their features to the request\/response object. A very popular one is the helmet package for security.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b0fe6cf elementor-widget elementor-widget-heading\" data-id=\"b0fe6cf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Application-level middleware<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-393d4f3 elementor-widget elementor-widget-text-editor\" data-id=\"393d4f3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Now if you have a specific, unique feature you have in mind that you want to execute on each client side request, you can write the function and use the app-level middleware. One important thing you must take note of when using this type of middleware is the importance of using next at the end, neglecting next means it gets stuck at that particular function without going forward to the callbacks. An example is this:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c623a98 elementor-widget elementor-widget-code-highlight\" data-id=\"c623a98\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard word-wrap\">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>app.use(function time(req, res, next){\r\nconsole.log(Date.now())\r\nnext()\r\n})\r\n\r\nAnother example is:\r\n\r\nfunction time(req, res, next){\r\nconsole.log(Date.now())\r\nnext()\r\n}\r\napp.get(\u2018\/\u2019, time, (req,res,next)=>{\r\nres.send(\u2018Welcome!\u2019)\r\n})<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e0b68fb elementor-widget elementor-widget-text-editor\" data-id=\"e0b68fb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Under this application-level middleware is another branch we call the error handling middleware. It catches errors and exceptions and directs them to the callback function which uses four(4) arguments. An example is:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-590752a elementor-widget elementor-widget-code-highlight\" data-id=\"590752a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard word-wrap\">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>app.use(function (error, req, res, next) {console.error(error)\r\nres.status(500).send(\u2018Something is wrong, please try again!\u2019)\r\n})<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-811c74e elementor-widget elementor-widget-heading\" data-id=\"811c74e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Router-level middlewares<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d55c5f4 elementor-widget elementor-widget-text-editor\" data-id=\"d55c5f4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>This middleware takes a peculiar turn such that it is bound to an instance of the router and not the whole application. We generate a router by express.Router().<\/p><p>So let\u2019s say we assign this router to a name router, we can then add middlewares that affect only that router rather than the whole application. This paves way to diversity and exclusions easily. After each router has been created and built it must be bound to the application by using an application-level router.<\/p><p>For example let\u2019s say we build a router to handle routes to user authentication both login, register and password reset, and we added a middleware that checks the device from which the request was sent and if not recognised by a database send an email notification to the user that an unknown device has logged in or if registering a welcome email. We won\u2019t want to put it as a top level app middleware, and adding it route by route might become stressful later on with increase in more authentication routes created for specific purposes. We can just add it as a top level router middleware and apply it to all routes in the router instance at once.<\/p><p>So how do we join it to the main application? Let\u2019s look at an example:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4853a18 elementor-widget elementor-widget-code-highlight\" data-id=\"4853a18\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard word-wrap\">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>var express = require(\u2018express\u2019)var app = express()var router = express.Router()\r\n\r\n\/\/ a middleware function with no mount path. This code is executed for every request to the router\r\nrouter.use(function (req, res, next) {\r\nconsole.log(Date.now())\r\nnext()\r\n})\r\n\/\/ handler for the \/user\/:id path, which renders a special page\r\nrouter.get(\u2018\/id\u2019, function (req, res, next) {\r\nlet random = Math.floor(Math.random()*1000)\r\nconsole.log(random)\r\nres.send(random)\r\n})\r\n\/\/ mount the router on the app\r\napp.use(\u2018\/\u2019, router)\r\n\/\/listen on port 5000\r\napp.listen(process.env.PORT || 5000, () => console.log(\u2018Server is running\u2019));\r\nmodule.exports = app<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-49a8bcc elementor-widget elementor-widget-text-editor\" data-id=\"49a8bcc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>In this example on request to \u2018\/id\u2019, a log is made showing the timestamp, then a random number is generated and also sent back to the client.<\/p><p>We attach the router to the app as shown in the last line. We have to make the router take a route that gets added to the routes in the router instance, at the last line we used app.use(\u2018\/\u2019, router) meaning no special route is added. we could decide to do app.use(\u2018\/generate\u2019, router), this would mean to access the id generator we have to use the route we have to use \u2018\/generator\/id\u2019.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-197db06 elementor-widget elementor-widget-heading\" data-id=\"197db06\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Callback<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b41680b elementor-widget elementor-widget-text-editor\" data-id=\"b41680b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Callbacks or callback function or handler functions generally mean a function that is run after an asynchronous function have been completed. NodeJs is a non blocking runtime meaning it makes use of async functions a lot. So when you use a route like app.get, you add a callback function to it, which could also be a middleware. Callbacks are not only limited to routes, you could use async functions as you wish and use callbacks to execute results.<br \/>An example is:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9591c3a elementor-widget elementor-widget-code-highlight\" data-id=\"9591c3a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard word-wrap\">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>const fs = require(\u201cfs\u201d);\r\n\r\nfs.readFile(\u201c.\/test.txt\u201d, \u201cutf8\u201d, function(err, data) {\r\nif(err) {\r\n\/\/ handle the error\r\n} else {\r\n\/\/ process the file text given with data\r\n}\r\n});<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-656c818 elementor-widget elementor-widget-text-editor\" data-id=\"656c818\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>NodeJs naturally provides the err and data parameter, though more parameters can be added. It is safe to say node.js was made for callbacks.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d05d012 elementor-widget elementor-widget-heading\" data-id=\"d05d012\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Callback hell\n<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8002ac7 elementor-widget elementor-widget-text-editor\" data-id=\"8002ac7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Sometimes due to needed use cases and inappropriate use of async and callbacks, we get a complex app with many and almost endless callbacks, this is what we call callback hell. So how do we solve this?<br \/>These methods could help in solving callback hell:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-658c878 elementor-widget elementor-widget-text-editor\" data-id=\"658c878\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<ul><li>Define every function not as an anonymous callback but separate named function.<\/li><li>Use of Javascript promises<\/li><li>Use of third party library Async.js<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b384a84 elementor-widget elementor-widget-heading\" data-id=\"b384a84\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Next<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-981bcf0 elementor-widget elementor-widget-text-editor\" data-id=\"981bcf0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>You could learn more about express.js and middlewares in the documentation here and read more on callbacks.<\/p><p>Want expert help for your next Express JS project? Get in touch with our technology experts who will guide you in your journey. <span style=\"color: #14a49c;\"><a style=\"color: #14a49c;\" href=\"http:\/\/ismiletechnologies.com\/contact-us\/\">Schedule a Free Evaluation<\/a><\/span>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>ExpressJs is a javascript framework that is used with NodeJs mainly for web and mobile applications. This goes with saying that express.js is used for building web or mobile backend services and served through routes. It is widely used by NodeJs backend developers and has a plethora of methods available to be used, and seeing [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":6526,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[249],"tags":[],"class_list":["post-6402","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dataops"],"_links":{"self":[{"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/posts\/6402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/comments?post=6402"}],"version-history":[{"count":7,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/posts\/6402\/revisions"}],"predecessor-version":[{"id":37209,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/posts\/6402\/revisions\/37209"}],"wp:attachment":[{"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/media?parent=6402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/categories?post=6402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ismiletechnologies.com\/en_us\/wp-json\/wp\/v2\/tags?post=6402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}