{"id":4924,"date":"2021-09-06T04:34:14","date_gmt":"2021-09-06T04:34:14","guid":{"rendered":"https:\/\/studysection.com\/blog\/?p=4924"},"modified":"2021-09-06T05:38:16","modified_gmt":"2021-09-06T05:38:16","slug":"how-to-install-and-configure-the-node-js-project","status":"publish","type":"post","link":"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/","title":{"rendered":"How to install and Configure the Node.js Project"},"content":{"rendered":"<p>In this article, we will learn how to install and configure the node js project. As we know Nodejs is a server-side programming language and it makes javascript more versatile. Nodejs helps in easily producing fast scalable network applications. <\/p>\n<p><a href=\"https:\/\/studysection.com\/blog\/a-fast-paced-introduction-to-nodejs\/\">Nodejs<\/a> uses an event-driven architecture that makes it lightweight. <\/p>\n<p>In ubuntu architecture, if you want to install a node in your local machine you need to download the node package using the following commands.  <\/p>\n<p><code>sudo apt-get install curl<br \/>\ncurl -sL https:\/\/deb.nodesource.com\/setup_13.x | sudo -E bash -<br \/>\nsudo apt-get install nodejs<\/code><\/p>\n<p>After downloading the node you can check the version of the Nodejs using the command<\/p>\n<p><code>node -v <\/code><br \/>\nThen we have to start creating our first project in our local machine using Nodejs using the following command and steps to create the project.<\/p>\n<ol>\n<li>Goto directory where you want to create a project could be any directory.<\/li>\n<li>Create a new folder using the command <strong><em>mkdir nodeproject<\/em><\/strong><\/li>\n<li>cd nodeproject<\/li>\n<li>npm init<br \/>\nAfter npm init, you\u2019ll see the below screen as per the screenshot.<br \/>\n<img decoding=\"async\" src=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/09\/nodecode.png\" alt=\"Node.js\" \/>\n<\/li>\n<li>Press enter and enter until the package.json file created<\/li>\n<li>Optionally you can type the author name, project description, and version as per your need in the above screen. <\/li>\n<li>Create a new file name it as server.js in the same directory and write the below code<br \/>\nThis file is basically the server file that you have created, without this server file you can not do any code further. So it is mandatory to create this.<br \/>\n<code>const express = require(\"express\");<br \/>\nconst app = express();<br \/>\nconst port = process.env.PORT || 3303;<br \/>\nglobal.app = app;<br \/>\n\/\/request handlers<br \/>\napp.get(\"\/\", (req, res) => {<br \/>\n  res.send(\"Welcome to the Node.js Tutorial! - \");<br \/>\n});<br \/>\napp.listen(port, () => {<br \/>\n  console.log(\"Server started on: \" + port);<br \/>\n});<\/code>\n<\/li>\n<li>To run the project you need to install basic packages like express<br \/>\nWe can use the command to download<br \/>\n<strong><em>npm install express<\/em><\/strong> in the command line in the same directory.<\/li>\n<li>To run the project we can use the command npm start as per the below screenshot<br \/>\n<img decoding=\"async\" src=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/09\/nodecode1.png\" alt=\"nodecode1\"\/>\n<\/li>\n<li>At last, go to your browser and type http:\/\/localhost:3303\/ and you\u2019ll find the screen as per the screenshot below.<br \/>\n<img decoding=\"async\" src=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/09\/nodeoutput.png\" alt=\"node output\" \/>\n <\/li>\n<\/ol>\n<p>So here are the simple steps of the basic tutorial on how to install and set up a project using Nodejs. <\/p>\n<p><small>The English language is the most widely used language as a medium of communication around the world. Having a certification for the English language can be an advantage. StudySection provides an <a href=\"https:\/\/www.studysection.com\/english-language-advanced-diploma\">English Certification Exam<\/a> that tests English language proficiency in English grammar, reading, and writing.<\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will learn how to install and configure the node js project. As we know Nodejs is<\/p>\n","protected":false},"author":1,"featured_media":4926,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[705,538],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to install and Configure the Node.js Project - SS Blog<\/title>\n<meta name=\"description\" content=\"In this article, we will learn how to install and configure the node js project. As we know Nodejs is a server-side programming language\" \/>\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\/how-to-install-and-configure-the-node-js-project\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install and Configure the Node.js Project - SS Blog\" \/>\n<meta property=\"og:description\" content=\"In this article, we will learn how to install and configure the node js project. As we know Nodejs is a server-side programming language\" \/>\n<meta property=\"og:url\" content=\"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/\" \/>\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=\"2021-09-06T04:34:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-06T05:38:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/09\/configure.png\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\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\/how-to-install-and-configure-the-node-js-project\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/\"},\"author\":{\"name\":\"admin-studysection-blog\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402\"},\"headline\":\"How to install and Configure the Node.js Project\",\"datePublished\":\"2021-09-06T04:34:14+00:00\",\"dateModified\":\"2021-09-06T05:38:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/\"},\"wordCount\":370,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/studysection.com\/blog\/#organization\"},\"keywords\":[\"Configure\",\"Node.js\"],\"articleSection\":[\"Learn and Grow\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/\",\"url\":\"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/\",\"name\":\"How to install and Configure the Node.js Project - SS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/#website\"},\"datePublished\":\"2021-09-06T04:34:14+00:00\",\"dateModified\":\"2021-09-06T05:38:16+00:00\",\"description\":\"In this article, we will learn how to install and configure the node js project. As we know Nodejs is a server-side programming language\",\"breadcrumb\":{\"@id\":\"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/studysection.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install and Configure the Node.js Project\"}]},{\"@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":"How to install and Configure the Node.js Project - SS Blog","description":"In this article, we will learn how to install and configure the node js project. As we know Nodejs is a server-side programming language","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\/how-to-install-and-configure-the-node-js-project\/","og_locale":"en_US","og_type":"article","og_title":"How to install and Configure the Node.js Project - SS Blog","og_description":"In this article, we will learn how to install and configure the node js project. As we know Nodejs is a server-side programming language","og_url":"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/","og_site_name":"Blog Posts on famous people, innovations and educational topics","article_publisher":"https:\/\/www.facebook.com\/studysection","article_published_time":"2021-09-06T04:34:14+00:00","article_modified_time":"2021-09-06T05:38:16+00:00","og_image":[{"width":300,"height":200,"url":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/09\/configure.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\/how-to-install-and-configure-the-node-js-project\/#article","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/"},"author":{"name":"admin-studysection-blog","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402"},"headline":"How to install and Configure the Node.js Project","datePublished":"2021-09-06T04:34:14+00:00","dateModified":"2021-09-06T05:38:16+00:00","mainEntityOfPage":{"@id":"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/"},"wordCount":370,"commentCount":0,"publisher":{"@id":"https:\/\/studysection.com\/blog\/#organization"},"keywords":["Configure","Node.js"],"articleSection":["Learn and Grow"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/","url":"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/","name":"How to install and Configure the Node.js Project - SS Blog","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/#website"},"datePublished":"2021-09-06T04:34:14+00:00","dateModified":"2021-09-06T05:38:16+00:00","description":"In this article, we will learn how to install and configure the node js project. As we know Nodejs is a server-side programming language","breadcrumb":{"@id":"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/studysection.com\/blog\/how-to-install-and-configure-the-node-js-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/studysection.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to install and Configure the Node.js Project"}]},{"@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":329,"_links":{"self":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/4924"}],"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=4924"}],"version-history":[{"count":5,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/4924\/revisions"}],"predecessor-version":[{"id":4935,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/4924\/revisions\/4935"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media\/4926"}],"wp:attachment":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media?parent=4924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/categories?post=4924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/tags?post=4924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}