{"id":4157,"date":"2024-09-25T14:41:06","date_gmt":"2024-09-25T12:41:06","guid":{"rendered":"https:\/\/www.combell.nl\/en\/help\/?post_type=ht_kb&#038;p=4157"},"modified":"2024-12-11T11:29:00","modified_gmt":"2024-12-11T10:29:00","slug":"getting-started-with-node-js","status":"publish","type":"ht_kb","link":"https:\/\/www.combell.nl\/en\/help\/kb\/getting-started-with-node-js\/","title":{"rendered":"Getting started with Node.js"},"content":{"rendered":"\n<p>Follow this guide to get started with Node.js. To do this, you must first purchase a Node.js package as an option on your web hosting.<\/p>\n\n\n\n<div class=\"wp-block-ht-block-toc  is-style-outline htoc htoc--position-wide toc-list-style-plain\" data-htoc-state=\"expanded\"><span class=\"htoc__title\"><span class=\"ht_toc_title\">IN THIS ARTICLE<\/span><span class=\"htoc__toggle\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\"><g fill=\"#444\"><path d=\"M15 7H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z\"><\/path><path d=\"M15 1H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1zM15 13H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z\"><\/path><\/g><\/svg><\/span><\/span><div class=\"htoc__itemswrap\"><ul class=\"ht_toc_list\"><li class=\"\"><a href=\"#htoc-step-1-uploading-your-node-js-app-into-git\">Step 1: uploading your Node.js app into git<\/a><\/li><li class=\"\"><a href=\"#htoc-step-2-add-your-node-js-instance\">Step 2: add your Node.js instance<\/a><\/li><li class=\"\"><a href=\"#htoc-step-3-running-your-node-js-pipeline\">Step 3: running your Node.js pipeline<\/a><\/li><li class=\"\"><a href=\"#htoc-step-4-make-your-app-available-online\">Step 4: Make your app available online<\/a><\/li><\/ul><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-step-1-uploading-your-node-js-app-into-git\">Step 1: uploading your Node.js app into git<\/h2>\n\n\n\n<p>Deploying your Node.js application is done with your code retrieved from an online git repository (e.g. GitHub, GitLab, Bitbucket&#8230; ). Therefore, you need to install your application locally first (npm install) and then upload it to a git repository. Copy your respository link (see screenshot) for step 2.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.combell.nl\/en\/help\/wp-content\/uploads\/nodejs-11-1.png\" alt=\"\" class=\"wp-image-24246\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-step-2-add-your-node-js-instance\">Step 2: add your Node.js instance<\/h2>\n\n\n\n<p>After your Node.js application is in a git repository, you need to link it to your Node.js instance at Combell. To do this, add a Node.js instance and link it to your git repository.<\/p>\n\n\n\n<p><strong>To add your Node.js instance, follow these steps in the&nbsp;<\/strong><a href=\"https:\/\/my.combell.nl\/en\" target=\"_blank\" rel=\"noopener\"><strong>control panel<\/strong><\/a><strong>:<\/strong><\/p>\n\n\n\n<ol>\n<li>Go to \u2018My Products\u2019 &gt; \u2018Web hosting\u2019 and click \u2018Manage hosting\u2019 next to your domain name.<\/li>\n\n\n\n<li>Click on \u2018Node.js\u2019 in the menu on the left.<\/li>\n\n\n\n<li>Click on \u2018Add Instance\u2019 on the right.<\/li>\n\n\n\n<li>Fill in the details of your application: Friendly name, Node.js version and the port on which the application can be reached.<\/li>\n\n\n\n<li>Check the repository requirements. In the package.json file, a \u2018build\u2019 and \u2018serve\u2019 script must be present in the \u2018scripts\u2019 field anyway.<\/li>\n\n\n\n<li>Enter your repository link. You can copy it from your git repository like Github.<\/li>\n\n\n\n<li>Copy the deploy key and click on \u2018Add Instance\u2019 to confirm.<\/li>\n\n\n\n<li>Now enter the deploy key in your git repository like GitHub, see screenshot. Read-only access is sufficient.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.combell.nl\/en\/help\/wp-content\/uploads\/nodejs-12-1-1024x504.png\" alt=\"\" class=\"wp-image-24247\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-step-3-running-your-node-js-pipeline\">Step 3: running your Node.js pipeline<\/h2>\n\n\n\n<p>After creating your instance, we can run the pipeline.<\/p>\n\n\n\n<p><strong>To run your Node.js pipeline, follow these steps in the&nbsp;<\/strong><a href=\"https:\/\/my.combell.nl\/en\" target=\"_blank\" rel=\"noopener\"><strong>control panel<\/strong><\/a><strong>:<\/strong><\/p>\n\n\n\n<ol>\n<li>Go to \u2018My Products\u2019 &gt; \u2018Web hosting\u2019 and click on \u2018Manage hosting\u2019 next to your domain name.<\/li>\n\n\n\n<li>Click on \u2018Node.js\u2019 in the menu on the left and choose your instance.<\/li>\n\n\n\n<li>Right-click \u2018Run pipeline\u2019, see screenshot.<\/li>\n\n\n\n<li>Your pipeline will now be executed. If it is successful, your application is running. To make it also available online, change the backend of your hosting package, see next step.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-step-4-make-your-app-available-online\">Step 4: Make your app available online<\/h2>\n\n\n\n<p>If you want your app to also be accessible via the internet, link it to a website on your hosting package.<\/p>\n\n\n\n<p><strong>To make your Node.js application available online, follow these steps in the&nbsp;<\/strong><a href=\"https:\/\/my.combell.nl\/en\" target=\"_blank\" rel=\"noopener\"><strong>control panel<\/strong><\/a><strong>:<\/strong><\/p>\n\n\n\n<ol>\n<li>Go to \u2018My Products\u2019 &gt; \u2018Web hosting\u2019 and click on \u2018Manage hosting\u2019 next to your domain name.<\/li>\n\n\n\n<li>Click on \u2018Websites &amp; SSL\u2019 in the menu on the left.<\/li>\n\n\n\n<li>Right-click \u2018Manage website\u2019 and select \u2018Change website backend\u2019.<\/li>\n\n\n\n<li>Select \u2018Node.js\u2019 and choose your Node.js application.<\/li>\n\n\n\n<li>Click \u2018Change website backend\u2019 to confirm. Surf to the website now and you will see the Node.js application.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">Tip: make sure your domain&#8217;s DNS settings correctly point to your hosting package.&nbsp;<br><strong>Read:&nbsp;<\/strong><a href=\"https:\/\/www.combell.nl\/en\/help\/kb\/how-do-i-link-my-domain-name-to-my-hosting\/\" data-type=\"ht_kb\" data-id=\"3896\"><strong>how to link a domain name to a hosting package<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Follow this guide to get started with Node.js. To do this, you must first purchase a Node.js package as an option on your web hosting. Step 1: uploading your Node.js app into git Deploying your Node.js application is done with your code retrieved from an online git repository (e.g. GitHub,&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[15],"ht-kb-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/4157"}],"collection":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/comments?post=4157"}],"version-history":[{"count":3,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/4157\/revisions"}],"predecessor-version":[{"id":4167,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb\/4157\/revisions\/4167"}],"wp:attachment":[{"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/media?parent=4157"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb-category?post=4157"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.combell.nl\/en\/help\/wp-json\/wp\/v2\/ht-kb-tag?post=4157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}