

{"id":103581,"date":"2021-12-03T10:40:15","date_gmt":"2021-12-03T05:10:15","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=103581"},"modified":"2021-12-03T10:40:47","modified_gmt":"2021-12-03T05:10:47","slug":"package-nodejs-project","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/","title":{"rendered":"Package Nodejs Project"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:302,&quot;href&quot;:&quot;https:\\\/\\\/github.com\\\/jxcore\\\/jxcore&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251005203111\\\/https:\\\/\\\/github.com\\\/jxcore\\\/jxcore&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-08 03:00:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-15 07:41:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-21 00:28:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-02 18:09:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-12 00:41:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-17 11:25:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-22 02:30:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-03 14:19:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 23:16:42&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 07:54:20&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-28 10:32:36&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-28 10:32:36&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>In this article, we will set up jx core in our system to package our nodejs project. Once we install jx core we can also use it to launch the project.<\/p>\n<h3>What is JX core?<\/h3>\n<p>It is open source and has the functionalities for encrypting the source file and packaging the source file.<\/p>\n<p>If you have a large project with tons of files then sharing it will become cumbersome. So what jx core does is that it will take your entire project and convert it into a single file.<\/p>\n<h3>Installing JX core:<\/h3>\n<p>It is easy to install jx core. Follow the below steps to install it successfully.<\/p>\n<p><strong>Step-1<\/strong><\/p>\n<p>We will be <a href=\"https:\/\/github.com\/jxcore\/jxcore\">installing a 64 bit jx core package<\/a>.<\/p>\n<p>The syntax is as follows:<\/p>\n<p>wget https:\/\/s3.amazonaws.com\/nodejx\/jx_rh64.zip<\/p>\n<p><strong>Step-2<\/strong><\/p>\n<p>Next step is to unzip the downloaded file and copy the path in \/usr\/bin<\/p>\n<p>Follow the below commands to unzip the file.<\/p>\n<p>unzip jx_rh64.zip<\/p>\n<p>cp jx_rh64\/jx \/usr\/bin<\/p>\n<p><strong>Step-3<\/strong><\/p>\n<p>Next step is to set our path variable so that we can use it from anywhere<\/p>\n<p>export PATH=$PATH:\/usr\/bin<\/p>\n<p><strong>Step -4<\/strong><\/p>\n<p>In order to verify the installation and see the version number run the below command:<\/p>\n<p>jx &#8211;version<\/p>\n<h3>Package the code:<\/h3>\n<p>In order to create a package go to the project directory and run the below command.<\/p>\n<p><strong>jx package index.js index<\/strong><\/p>\n<p>The above command will create this two files<\/p>\n<ul>\n<li>Index.jxp: It is an intermediate file containing the project detail needed to compile the project.<\/li>\n<li>index.jx: It is the binary file containing the complete package that will be sent to other machines.<\/li>\n<\/ul>\n<h3>Launch the jx file:<\/h3>\n<p>To launch the file, run the below command.<\/p>\n<p><strong>jx index.jx command_line_arguments.<\/strong><\/p>\n<h3>Packaging a node js application using the pkg module:<\/h3>\n<p>In this section, we will discuss how you can package your application using the pkg module. We will look into how you can install the pkg module and its use.<\/p>\n<h3>PKG:<\/h3>\n<p>It is a cli that helps us create an exe file for our nodejs application. It will make your application run on devices that do not have node js installed.<\/p>\n<h3>Installing PKG:<\/h3>\n<p>To install the pkg package run the below module:<\/p>\n<p><strong>Npm install -g pkg<\/strong><\/p>\n<h3>Creating the executable files:<\/h3>\n<p>I am considering that the entry point of your nodejs application is index.js. So now for creating the executable files run the below command.<\/p>\n<p>pkg index.js<\/p>\n<p>The above command will generate three files one each for linux, macos and windows<\/p>\n<p>Now you can use these three files in their respective devices.<\/p>\n<h3>Summary:<\/h3>\n<p>In this blog, we have thoroughly discussed the steps required to package a nodejs application. I hope you were able to install and use jx core successfully.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will set up jx core in our system to package our nodejs project. Once we install jx core we can also use it to launch the project. What is JX&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":103950,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25259],"tags":[25783],"class_list":["post-103581","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-node-js-tutorials","tag-package-nodejs-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Package Nodejs Project - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn how to set up jx core in the system to package nodejs project. Once you install jx core, you can also use it to launch the project.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Package Nodejs Project - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn how to set up jx core in the system to package nodejs project. Once you install jx core, you can also use it to launch the project.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-03T05:10:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-03T05:10:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/10\/package-nodejs-project.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=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Package Nodejs Project - DataFlair","description":"Learn how to set up jx core in the system to package nodejs project. Once you install jx core, you can also use it to launch the project.","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:\/\/data-flair.training\/blogs\/package-nodejs-project\/","og_locale":"en_US","og_type":"article","og_title":"Package Nodejs Project - DataFlair","og_description":"Learn how to set up jx core in the system to package nodejs project. Once you install jx core, you can also use it to launch the project.","og_url":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2021-12-03T05:10:15+00:00","article_modified_time":"2021-12-03T05:10:47+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/10\/package-nodejs-project.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9"},"headline":"Package Nodejs Project","datePublished":"2021-12-03T05:10:15+00:00","dateModified":"2021-12-03T05:10:47+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/"},"wordCount":463,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/10\/package-nodejs-project.webp","keywords":["Package Nodejs Project"],"articleSection":["Node Js Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/package-nodejs-project\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/","url":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/","name":"Package Nodejs Project - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/10\/package-nodejs-project.webp","datePublished":"2021-12-03T05:10:15+00:00","dateModified":"2021-12-03T05:10:47+00:00","description":"Learn how to set up jx core in the system to package nodejs project. Once you install jx core, you can also use it to launch the project.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/package-nodejs-project\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/10\/package-nodejs-project.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/10\/package-nodejs-project.webp","width":1200,"height":628,"caption":"package nodejs project"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/package-nodejs-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Node Js Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/node-js-tutorials\/"},{"@type":"ListItem","position":3,"name":"Package Nodejs Project"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team is a group of passionate educators and industry experts dedicated to providing high-quality online learning resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With years of experience in the field, the team aims to simplify complex topics and help learners advance their careers. At DataFlair, we believe in empowering students and professionals with the knowledge and skills needed to thrive in today\u2019s fast-paced tech industry. Follow us for Free courses, expert insights, tutorials, and practical tips to boost your learning journey.","url":"https:\/\/data-flair.training\/blogs\/author\/datafbdad\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/103581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=103581"}],"version-history":[{"count":3,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/103581\/revisions"}],"predecessor-version":[{"id":103951,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/103581\/revisions\/103951"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/103950"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=103581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=103581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=103581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}