{"id":57,"date":"2019-09-20T17:26:44","date_gmt":"2019-09-20T17:26:44","guid":{"rendered":"https:\/\/www.kindsonthegenius.com\/nodejs\/?p=57"},"modified":"2020-07-26T09:25:48","modified_gmt":"2020-07-26T09:25:48","slug":"06-node-js-introduction-to-callback","status":"publish","type":"post","link":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/","title":{"rendered":"Node.js \u2013 Introduction to Callback"},"content":{"rendered":"<p>Callbacks in Node.js is simply a function that behaves asynchronously. What does this mean? It means that the function is called at the completion of each task.<\/p>\n<p>Callbacks is very important in Node.js and therefore you need to understand it clearly.<\/p>\n<p><a href=\"https:\/\/www.kindsonthegenius.com\/nodejs\/node-js-course-outline\/\">Get the Node.js Course Outline here<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>How Callbacks Work<\/strong><\/p>\n<p>Take an example. You have a function that reads the content of a file in the disk. In normal (synchronous) functions, the body of this function starts executing. Then, after execution, control is returned to the main program. Meanwhile, the main program must wait for the function to complete. But in callbacks, once the function starts executing, the main program can run in parallel. So, it does not need to wait for the function to complete. So when the task is completed, that it, file is read from disk, then you need to specify a code that would execute. Somehow, the function is &#8216;called back&#8217; again. That is where the name callback comes:<\/p>\n<ul>\n<li>first it is called at the start of execution<\/li>\n<li>then it is &#8216;called back&#8217; at the end of execution<\/li>\n<\/ul>\n<p>So we say that the code executes in a non-blocking way.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Examples of Non-Callback Code<\/strong><\/p>\n<p>To get it clear, we would write two piece of code. The first code would be a normal code without callback. Then we would write the same code using\u00a0 a callback.<\/p>\n<p>Create a file using notepad and save it in your drive D. Write the following text inside:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\">The Tech Pro is always here to provide the best learning experience <span style=\"color: #008800; font-weight: bold;\">for<\/span> Software Development\r\nFeel free to subscribe to the YouTube Channel, Kindson The Tech Pro<span style=\"color: #333333;\">. \r\nHe'll be pleased to assist you!<\/span>\r\n<\/pre>\n<p>Now, write this block of code in app.js. ( you have this from the previous lesson)<\/p>\n<p>&nbsp;<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #888888;\">\/\/Read content of file and write it to the output<\/span>\r\nconsole.log(<span style=\"background-color: #fff0f0;\">\"Begining of task\"<\/span>);\r\n<span style=\"color: #008800; font-weight: bold;\">var<\/span> fs <span style=\"color: #333333;\">=<\/span> require(<span style=\"background-color: #fff0f0;\">\"fs\"<\/span>);\r\n<span style=\"color: #008800; font-weight: bold;\">var<\/span> text <span style=\"color: #333333;\">=<\/span> fs.readFileSync(<span style=\"background-color: #fff0f0;\">'D:\/nodefiles\/testinput.txt'<\/span>);\r\n\r\nconsole.log(text.toString());\r\nconsole.log(<span style=\"background-color: #fff0f0;\">\"End of Program\"<\/span>);\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Run this code using the command:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\">PS D<span style=\"color: #ff0000; background-color: #ffaaaa;\">:<\/span>\\Documents\\NodeJSTutorials1&gt; node app.js\r\n<\/pre>\n<p>The output of the program would be\u00a0 as given below:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\">Understanding Callbacks <span style=\"color: #008800; font-weight: bold;\">in<\/span> node.js\r\nThe Tech Pro is always here to provide the best learning experience <span style=\"color: #008800; font-weight: bold;\">for<\/span> Software Development\r\nFeel free to subscribe to the YouTube Channel, Kindson The Tech Pro.\r\nHe is pleased to assist you!\r\n<span style=\"color: #008800; font-weight: bold;\">End<\/span> of Program\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Using a Callback<\/strong><\/p>\n<p>Now, we would do the same using a callback.<\/p>\n<p>The syntax is as follows:<\/p>\n<pre style=\"margin: 0; line-height: 125%;\">fs.readFile(path, <span style=\"color: #008800; font-weight: bold;\">function<\/span>(err, data){ <span style=\"color: #888888;\">\/* Code to execute *\/<\/span> });\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>In the code above, the &#8216;Code to execute&#8217; is the code to run after the function completes while data is the data returned.<\/p>\n<p>err is used when error occurs.<\/p>\n<p>Interestingly, callback works in a similar way in AngularJs. (<a href=\"https:\/\/kindsonthegenius.com\/blog\/angularjs-tutorial-for-beginners-course-outline-1\" target=\"_blank\" rel=\"noopener noreferrer\">Learn AngularJs here<\/a>)<\/p>\n<p>Now the complete callback is given below.<\/p>\n<p>&nbsp;<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">var<\/span> fs <span style=\"color: #333333;\">=<\/span> require(<span style=\"background-color: #fff0f0;\">\"fs\"<\/span>)\r\n<span style=\"color: #008800; font-weight: bold;\">var<\/span> path <span style=\"color: #333333;\">=<\/span> <span style=\"background-color: #fff0f0;\">\"D:\/nodefiles\/testinput.txt\"<\/span>;\r\nfs.readFile(path, <span style=\"color: #008800; font-weight: bold;\">function<\/span>(err, data){ \r\n    <span style=\"color: #008800; font-weight: bold;\">if<\/span>(err) <span style=\"color: #008800; font-weight: bold;\">return<\/span> console.error(err);\r\n    console.log(data.toString());\r\n    console.log(<span style=\"background-color: #fff0f0;\">\"End of Program\"<\/span>);\r\n });\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>In this case, the program does not wait for the file to be read from disk. However, if the data return is to be used, then the block of code that uses it should be placed inside the callback.<\/p>\n<p>Hopefully, this helps clarify callbacks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Callbacks in Node.js is simply a function that behaves asynchronously. What does this mean? It means that the function is called at the completion of &hellip; <\/p>\n","protected":false},"author":1,"featured_media":61,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,2],"tags":[],"class_list":["post-57","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-callbacks","category-node-js-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Node.js \u2013 Introduction to Callback - Node.js Tutorials<\/title>\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.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Node.js \u2013 Introduction to Callback - Node.js Tutorials\" \/>\n<meta property=\"og:description\" content=\"Callbacks in Node.js is simply a function that behaves asynchronously. What does this mean? It means that the function is called at the completion of &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/\" \/>\n<meta property=\"og:site_name\" content=\"Node.js Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-20T17:26:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-07-26T09:25:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/09\/How-Callbacks-work-in-Node.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"895\" \/>\n\t<meta property=\"og:image:height\" content=\"364\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"kindsonthegenius\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kindsonthegenius\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/\"},\"author\":{\"name\":\"kindsonthegenius\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/#\\\/schema\\\/person\\\/7f8fc5792578d2ff54003fcebe6c46b5\"},\"headline\":\"Node.js \u2013 Introduction to Callback\",\"datePublished\":\"2019-09-20T17:26:44+00:00\",\"dateModified\":\"2020-07-26T09:25:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/\"},\"wordCount\":402,\"commentCount\":2,\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2019\\\/09\\\/How-Callbacks-work-in-Node.jpg\",\"articleSection\":[\"Callbacks\",\"Node.js Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/\",\"name\":\"Node.js \u2013 Introduction to Callback - Node.js Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2019\\\/09\\\/How-Callbacks-work-in-Node.jpg\",\"datePublished\":\"2019-09-20T17:26:44+00:00\",\"dateModified\":\"2020-07-26T09:25:48+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/#\\\/schema\\\/person\\\/7f8fc5792578d2ff54003fcebe6c46b5\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2019\\\/09\\\/How-Callbacks-work-in-Node.jpg\",\"contentUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2019\\\/09\\\/How-Callbacks-work-in-Node.jpg\",\"width\":895,\"height\":364,\"caption\":\"How Callbacks work in Node.js\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/06-node-js-introduction-to-callback\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Node.js \u2013 Introduction to Callback\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/#website\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/\",\"name\":\"Node.js Tutorials\",\"description\":\"Best Node.js Tutorials\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/#\\\/schema\\\/person\\\/7f8fc5792578d2ff54003fcebe6c46b5\",\"name\":\"kindsonthegenius\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g\",\"caption\":\"kindsonthegenius\"},\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/nodejs\\\/author\\\/kindsonthegenius-3\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Node.js \u2013 Introduction to Callback - Node.js Tutorials","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.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/","og_locale":"en_US","og_type":"article","og_title":"Node.js \u2013 Introduction to Callback - Node.js Tutorials","og_description":"Callbacks in Node.js is simply a function that behaves asynchronously. What does this mean? It means that the function is called at the completion of &hellip;","og_url":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/","og_site_name":"Node.js Tutorials","article_published_time":"2019-09-20T17:26:44+00:00","article_modified_time":"2020-07-26T09:25:48+00:00","og_image":[{"width":895,"height":364,"url":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/09\/How-Callbacks-work-in-Node.jpg","type":"image\/jpeg"}],"author":"kindsonthegenius","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kindsonthegenius","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/#article","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/"},"author":{"name":"kindsonthegenius","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/#\/schema\/person\/7f8fc5792578d2ff54003fcebe6c46b5"},"headline":"Node.js \u2013 Introduction to Callback","datePublished":"2019-09-20T17:26:44+00:00","dateModified":"2020-07-26T09:25:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/"},"wordCount":402,"commentCount":2,"image":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/09\/How-Callbacks-work-in-Node.jpg","articleSection":["Callbacks","Node.js Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/","url":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/","name":"Node.js \u2013 Introduction to Callback - Node.js Tutorials","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/#primaryimage"},"image":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/09\/How-Callbacks-work-in-Node.jpg","datePublished":"2019-09-20T17:26:44+00:00","dateModified":"2020-07-26T09:25:48+00:00","author":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/#\/schema\/person\/7f8fc5792578d2ff54003fcebe6c46b5"},"breadcrumb":{"@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/#primaryimage","url":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/09\/How-Callbacks-work-in-Node.jpg","contentUrl":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-content\/uploads\/sites\/5\/2019\/09\/How-Callbacks-work-in-Node.jpg","width":895,"height":364,"caption":"How Callbacks work in Node.js"},{"@type":"BreadcrumbList","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/06-node-js-introduction-to-callback\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.kindsonthegenius.com\/nodejs\/"},{"@type":"ListItem","position":2,"name":"Node.js \u2013 Introduction to Callback"}]},{"@type":"WebSite","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/#website","url":"https:\/\/www.kindsonthegenius.com\/nodejs\/","name":"Node.js Tutorials","description":"Best Node.js Tutorials","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.kindsonthegenius.com\/nodejs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.kindsonthegenius.com\/nodejs\/#\/schema\/person\/7f8fc5792578d2ff54003fcebe6c46b5","name":"kindsonthegenius","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b9d710de456c3d85e5614c3a6992fa3d527425e2ab32b8bd5d85bfbaa235004b?s=96&d=mm&r=g","caption":"kindsonthegenius"},"url":"https:\/\/www.kindsonthegenius.com\/nodejs\/author\/kindsonthegenius-3\/"}]}},"_links":{"self":[{"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/posts\/57","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":4,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":114,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/posts\/57\/revisions\/114"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/media\/61"}],"wp:attachment":[{"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/nodejs\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}