{"id":1837,"date":"2020-01-02T06:32:39","date_gmt":"2020-01-02T06:32:39","guid":{"rendered":"https:\/\/studysection.com\/blog\/?p=1837"},"modified":"2020-01-02T06:33:55","modified_gmt":"2020-01-02T06:33:55","slug":"a-fast-paced-introduction-to-nodejs","status":"publish","type":"post","link":"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/","title":{"rendered":"A fast-paced introduction to Node.js"},"content":{"rendered":"<h2>What is Node.js?<\/h2>\n<p>Node.js is a Javascript runtime environment. Javascript is a programming language typically used in a browser to manipulate the page that renders it in the browser. For example, we can open a popup, a model or any kind of special event as Javascript is a language that runs in a browser that allows you to interact with the web page after it gets loaded. Node.js is a <a href=\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-javascript-for-beginners\/\">Javascript environment<\/a> that allows javascript to run on the server-side.<\/p>\n<h3>Technical work of Node.js<\/h3>\n<p>Node.js uses V8 and V8 is a javascript engine built by Google that runs Javascript in the browser. V8 takes the javascript code and compiles it to machine code. V8 is written in c++.<\/p>\n<h3>Installing Node.js and creating the first application<\/h3>\n<p><strong>Step 1:<\/strong> Go to <a href=\"https:\/\/nodejs.org\/en\/\">https:\/\/nodejs.org\/en\/<\/a>, download setup and install it on your computer.<br \/>\n<strong>Step 2:<\/strong> After successfully installation, open a command prompt and run the command node -v. It will return the version that has been configured or installed.<br \/>\n<img decoding=\"async\" src=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2020\/01\/nodejsinstall1-e1577944264880.png\" alt=\"node.js\"\/><br \/>\n<strong>Step 3:<\/strong>Create a folder like <strong>C:xampp\/htdocs\/test<\/strong><br \/>\n<strong>Step 4:<\/strong> Create a File <strong>test.js<\/strong> within the test folder<\/p>\n<p><strong>Step 5:<\/strong> Write following code:<\/p>\n<pre>\r\nvar http = require('http');\r\nhttp.createServer(function (req, res) {\r\n  res.writeHead(200, {'Content-Type': 'text\/html'});\r\n  res.end('Hello World!');\r\n}).listen(8080);\r\n<\/pre>\n<p><strong>Step 6:<\/strong> Open a command prompt and enter to the folder <strong>C:xampp\/htdocs\/test<\/strong> and run command node <strong>test.js<\/strong><br \/>\nOutput: On URL (http:\/\/localhost:8080)  you will find the result of whatever you have written in file test.js.for example, I have written \u201cHello World\u201d<br \/>\n<img decoding=\"async\" src=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2020\/01\/nodejsinstall2.png\" alt=\"node.js2\"><\/p>\n<p><strong>Note:<\/strong> If you will change anything in code in file <strong>test.js<\/strong> you need to run command node test.js again to see new changes.<\/p>\n<h3>Node.js can do<\/h3>\n<p>These are the main features Node.js is used for:<br \/>\nWe can manage packages through <a href=\"https:\/\/www.npmjs.com\/\">npm<\/a>, <a href=\"https:\/\/bower.io\/\">bower<\/a>, <a href=\"http:\/\/jspm.io\/\">jspm<\/a>, etc.<br \/>\nWhile development tooling we can do module management with <a href=\"https:\/\/webpack.github.io\/\">webpack<\/a>, task running and automation through <a href=\"http:\/\/gruntjs.com\/\">grunt<\/a> or <a href=\"http:\/\/gulpjs.com\/\">gulp<\/a>, linters like <a href=\"http:\/\/eslint.org\/\">eslint<\/a> or <a href=\"http:\/\/www.jslint.com\/\">jslint<\/a>, etc<br \/>\nWe can create back-end web applications.<br \/>\nCommand-line tools like <a href=\"https:\/\/github.com\/isaacs\/rimraf\">rimraf<\/a>.<br \/>\nDesktop applications.<\/p>\n<p><small><em>Study Section provides a big list of certification exams through its online platform. The <a href=\"https:\/\/www.studysection.com\/basics-of-french-foundation\">French Certification<\/a> exam can help you to certify your skills to communicate in the French language. Whether you are new to the language or you are an expert in it, this French certification exam can test the ability of anybody\u2019s command over the French language.<\/em><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Node.js? Node.js is a Javascript runtime environment. Javascript is a programming language typically used in a browser to<\/p>\n","protected":false},"author":1,"featured_media":1851,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[39,325,66,23],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>StudySection Blog - A fast-paced introduction to Node.js<\/title>\n<meta name=\"description\" content=\"Node.js is a Javascript runtime environment. Javascript is a programming language used in a browser to manipulate the page that renders it in the browser.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"StudySection Blog - A fast-paced introduction to Node.js\" \/>\n<meta property=\"og:description\" content=\"Node.js is a Javascript runtime environment. Javascript is a programming language used in a browser to manipulate the page that renders it in the browser.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Posts on famous people, innovations and educational topics\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/studysection\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-02T06:32:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-01-02T06:33:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2020\/01\/nodejsblog.png\" \/>\n\t<meta property=\"og:image:width\" content=\"465\" \/>\n\t<meta property=\"og:image:height\" content=\"291\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin-studysection-blog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@studysection\" \/>\n<meta name=\"twitter:site\" content=\"@studysection\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin-studysection-blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/\"},\"author\":{\"name\":\"admin-studysection-blog\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402\"},\"headline\":\"A fast-paced introduction to Node.js\",\"datePublished\":\"2020-01-02T06:32:39+00:00\",\"dateModified\":\"2020-01-02T06:33:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/\"},\"wordCount\":390,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/studysection.com\/blog\/#organization\"},\"keywords\":[\"introduction\",\"nodejs\",\"programming\",\"webdevelopment\"],\"articleSection\":[\"Learn and Grow\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/\",\"url\":\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/\",\"name\":\"StudySection Blog - A fast-paced introduction to Node.js\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/#website\"},\"datePublished\":\"2020-01-02T06:32:39+00:00\",\"dateModified\":\"2020-01-02T06:33:55+00:00\",\"description\":\"Node.js is a Javascript runtime environment. Javascript is a programming language used in a browser to manipulate the page that renders it in the browser.\",\"breadcrumb\":{\"@id\":\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/studysection.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A fast-paced introduction to Node.js\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/studysection.com\/blog\/#website\",\"url\":\"https:\/\/studysection.com\/blog\/\",\"name\":\"Blog Posts on famous people, innovations and educational topics\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/studysection.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/studysection.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/studysection.com\/blog\/#organization\",\"name\":\"StudySection\",\"url\":\"https:\/\/studysection.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png\",\"contentUrl\":\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png\",\"width\":920,\"height\":440,\"caption\":\"StudySection\"},\"image\":{\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/studysection\",\"https:\/\/twitter.com\/studysection\",\"https:\/\/www.instagram.com\/study.section\/\",\"https:\/\/www.linkedin.com\/company\/studysection\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402\",\"name\":\"admin-studysection-blog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g\",\"caption\":\"admin-studysection-blog\"},\"url\":\"https:\/\/studysection.com\/blog\/author\/admin-studysection-blog\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"StudySection Blog - A fast-paced introduction to Node.js","description":"Node.js is a Javascript runtime environment. Javascript is a programming language used in a browser to manipulate the page that renders it in the browser.","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:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/","og_locale":"en_US","og_type":"article","og_title":"StudySection Blog - A fast-paced introduction to Node.js","og_description":"Node.js is a Javascript runtime environment. Javascript is a programming language used in a browser to manipulate the page that renders it in the browser.","og_url":"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/","og_site_name":"Blog Posts on famous people, innovations and educational topics","article_publisher":"https:\/\/www.facebook.com\/studysection","article_published_time":"2020-01-02T06:32:39+00:00","article_modified_time":"2020-01-02T06:33:55+00:00","og_image":[{"width":465,"height":291,"url":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2020\/01\/nodejsblog.png","type":"image\/png"}],"author":"admin-studysection-blog","twitter_card":"summary_large_image","twitter_creator":"@studysection","twitter_site":"@studysection","twitter_misc":{"Written by":"admin-studysection-blog","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/#article","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/"},"author":{"name":"admin-studysection-blog","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402"},"headline":"A fast-paced introduction to Node.js","datePublished":"2020-01-02T06:32:39+00:00","dateModified":"2020-01-02T06:33:55+00:00","mainEntityOfPage":{"@id":"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/"},"wordCount":390,"commentCount":0,"publisher":{"@id":"https:\/\/studysection.com\/blog\/#organization"},"keywords":["introduction","nodejs","programming","webdevelopment"],"articleSection":["Learn and Grow"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/","url":"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/","name":"StudySection Blog - A fast-paced introduction to Node.js","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/#website"},"datePublished":"2020-01-02T06:32:39+00:00","dateModified":"2020-01-02T06:33:55+00:00","description":"Node.js is a Javascript runtime environment. Javascript is a programming language used in a browser to manipulate the page that renders it in the browser.","breadcrumb":{"@id":"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/studysection.com\/blog\/"},{"@type":"ListItem","position":2,"name":"A fast-paced introduction to Node.js"}]},{"@type":"WebSite","@id":"https:\/\/studysection.com\/blog\/#website","url":"https:\/\/studysection.com\/blog\/","name":"Blog Posts on famous people, innovations and educational topics","description":"","publisher":{"@id":"https:\/\/studysection.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/studysection.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/studysection.com\/blog\/#organization","name":"StudySection","url":"https:\/\/studysection.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png","contentUrl":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png","width":920,"height":440,"caption":"StudySection"},"image":{"@id":"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/studysection","https:\/\/twitter.com\/studysection","https:\/\/www.instagram.com\/study.section\/","https:\/\/www.linkedin.com\/company\/studysection"]},{"@type":"Person","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402","name":"admin-studysection-blog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g","caption":"admin-studysection-blog"},"url":"https:\/\/studysection.com\/blog\/author\/admin-studysection-blog\/"}]}},"views":361,"_links":{"self":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/1837"}],"collection":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/comments?post=1837"}],"version-history":[{"count":13,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/1837\/revisions"}],"predecessor-version":[{"id":1853,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/1837\/revisions\/1853"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media\/1851"}],"wp:attachment":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media?parent=1837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/categories?post=1837"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/tags?post=1837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}