<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Swadesh Behera</title>
    <description>The latest articles on DEV Community by Swadesh Behera (@itswadesh).</description>
    <link>https://dev.to/itswadesh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F274010%2F70416379-f4bf-4716-95f2-b3f7ddaa07e7.jpeg</url>
      <title>DEV Community: Swadesh Behera</title>
      <link>https://dev.to/itswadesh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/itswadesh"/>
    <language>en</language>
    <item>
      <title>Celebrating the first 1000 stars on GitHub ⭐️</title>
      <dc:creator>Swadesh Behera</dc:creator>
      <pubDate>Thu, 27 Apr 2023 11:22:44 +0000</pubDate>
      <link>https://dev.to/itswadesh/celebrating-the-first-1000-stars-on-github-59c4</link>
      <guid>https://dev.to/itswadesh/celebrating-the-first-1000-stars-on-github-59c4</guid>
      <description>&lt;p&gt;Svelte Commerce have just reached the 1000th star milestone on &lt;a href="https://github.com/itswadesh/svelte-commerce"&gt;GitHub&lt;/a&gt;, and it is the perfect opportunity to thank you for your support! 💪&lt;/p&gt;

&lt;p&gt;We will use this milestone to recap Svelte Commerce’s growth and other important milestones since it began as an experimental project in 2019...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/itswadesh/svelte-commerce"&gt;Still haven't try Svelte Commerce? What are you waiting for!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even though tracking the success of an open-source project is known to be a hard problem, we have a few metrics available to us&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D8aPaOYH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pase7rw48lm0a8erauar.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D8aPaOYH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pase7rw48lm0a8erauar.png" alt="Svelte Commerce Star History" width="800" height="561"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Greatest moments timeline:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;October 2019 : First Commit&lt;/li&gt;
&lt;li&gt;August 2021 : &lt;a href="https://github.com/itswadesh/svelte-commerce/commits?author=itswadesh"&gt;First Contributor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;December 2022: Sveltekit 1.0&lt;/li&gt;
&lt;li&gt;April 2023 : Svelte Commerce &lt;strong&gt;released&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;April 2023 : First &lt;strong&gt;1000&lt;/strong&gt; stars in the Svelte Commerce repository on Github... &lt;strong&gt;3,02,188&lt;/strong&gt; lines of code written, &lt;strong&gt;100&lt;/strong&gt; liters of coffee consumed&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Thank you to everyone in the community
&lt;/h2&gt;

&lt;p&gt;Thank you to our entire Svelte Commerce developer community for helping the project reach this amazing milestone! To all of those who have helped the project reach this stage of its evolution. Thank you to all of you who continue to help us as we move the project forward and as we look to build our community further. We want to thank our community for being part of the Svelte Commerce adventure, with a special mention for some contributors such as &lt;strong&gt;Pratap Maharana&lt;/strong&gt;, &lt;strong&gt;Deepjyoti Barman, Ashok, Jycouet, Seanogor&lt;/strong&gt;. It is good to know that there is a group of early adopters who like what we are doing at Svelte Commerce.&lt;/p&gt;

&lt;p&gt;We will stay committed to the open-source community and ensure the highest level of quality and transparency. With that in mind, &lt;a href="https://github.com/itswadesh/svelte-commerce/blob/master/CONTRIBUTING.md"&gt;we look forward to all contributions&lt;/a&gt; to our project. If you have any questions, we have a &lt;a href="https://discord.gg/GgdAeccwDR"&gt;Discord server&lt;/a&gt; to chat with you. We count on you to keep making our Github stars rising... So help us reach 5,000 stars next!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Steps to Configure Vultr for Nodejs Deployment</title>
      <dc:creator>Swadesh Behera</dc:creator>
      <pubDate>Sat, 01 Feb 2020 07:32:30 +0000</pubDate>
      <link>https://dev.to/itswadesh/steps-to-configure-vultr-for-nodejs-deployment-4fo7</link>
      <guid>https://dev.to/itswadesh/steps-to-configure-vultr-for-nodejs-deployment-4fo7</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fu3EYXvW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.angularcode.com/assets/static/vultr.07cc2b7.7930dcae2a74546167203c63d4ae3dfb.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fu3EYXvW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.angularcode.com/assets/static/vultr.07cc2b7.7930dcae2a74546167203c63d4ae3dfb.webp" alt="vultr"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I finished building my NodeJS app. Next step is to deploy it to some cloud server.&lt;br&gt;
In this tutorial I will guide you how to setup and deploy nodejs application for production to ubuntu cloud. &lt;br&gt;
We will be using &lt;a href="https://www.vultr.com/?ref=8346436"&gt;Vultr&lt;/a&gt; cloud for this deployment. Vultr is simple and easy to get started.&lt;/p&gt;

&lt;p&gt;Here are the list of steps that we need, in order to complete the setup process&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create and start a droplet&lt;/li&gt;
&lt;li&gt;Login to that droplet&lt;/li&gt;
&lt;li&gt;Install NodeJS&lt;/li&gt;
&lt;li&gt;Configure timezone&lt;/li&gt;
&lt;li&gt;Install Database (MongoDB)&lt;/li&gt;
&lt;li&gt;Setup nginx and build-essentials&lt;/li&gt;
&lt;li&gt;Copy project files&lt;/li&gt;
&lt;li&gt;Install node modules&lt;/li&gt;
&lt;li&gt;Setup &amp;amp; Start PM2&lt;/li&gt;
&lt;li&gt;Enable https&lt;/li&gt;
&lt;/ol&gt;

&lt;h1 id="create"&gt; Create and start a droplet &lt;/h1&gt;

&lt;p&gt;Head to &lt;a href="https://www.vultr.com/?ref=8346436"&gt;&lt;/a&gt;&lt;a href="https://www.vultr.com"&gt;https://www.vultr.com&lt;/a&gt; and create a Vultr account.&lt;/p&gt;

&lt;p&gt;Login to &lt;a href="https://www.vultr.com/?ref=8346436"&gt;Vultr&lt;/a&gt; panel and create the droplet. for a nodejs project it is recommended to go for 2GB RAM droplet&lt;/p&gt;

&lt;p&gt;Choose a region closer to your target audience location&lt;br&gt;
Select UBUNTU 18.x as the operating system&lt;/p&gt;

&lt;h1 id="login"&gt; Login to that droplet &lt;/h1&gt;

&lt;p&gt;The droplet creation will take somewhere between 1–3 minutes. Upon completion, it will be assigned with an IP Address&lt;/p&gt;
&lt;h2&gt;
  
  
  Option-1 (Using password)
&lt;/h2&gt;

&lt;p&gt;Copy that IP Address and in your command prompt type &lt;code&gt;ssh root@YOUR_IP_ADDRESS&lt;/code&gt;&lt;br&gt;
e.g. &lt;code&gt;ssh root@100.100.0.100&lt;/code&gt;&lt;br&gt;
Enter the password and you must be logged in as root&lt;/p&gt;
&lt;h2&gt;
  
  
  Option-2 (Using a public/private key pair)
&lt;/h2&gt;

&lt;p&gt;e.g. &lt;code&gt;ssh -i D:/ssh/key-file.ppk root@100.100.0.100&lt;/code&gt;&lt;br&gt;
&lt;em&gt;key-file.ppk&lt;/em&gt; is your private key&lt;/p&gt;

&lt;h1 id="install"&gt; Install NodeJS&lt;/h1&gt;

&lt;p&gt;Get the node source and install it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt-get install nodejs -y
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1 id="configure"&gt; Configure timezone&lt;/h1&gt;

&lt;p&gt;This is essential when you deal with dates in your application&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo dpkg-reconfigure tzdata # Add timezone as Kolkata
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1 id="database"&gt; Install Database (MongoDB) &lt;/h1&gt;

&lt;p&gt;Create a list file for MongoDB&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Install&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update
sudo apt-get install -y mongodb-org
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Start MongoDB Service&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo service mongod start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Edit the mongod.config&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /etc/mongod.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Change line 23 to bindIp: 0.0.0.0&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo service mongod restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1 id="nginx"&gt;  Setup nginx and build-essentials &lt;/h1&gt;

&lt;p&gt;Why nginx?&lt;/p&gt;

&lt;p&gt;We will use nginx as a reverse proxy as well as a server to serve static files. This gives us advantage like &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;https&lt;/li&gt;
&lt;li&gt;caching&lt;/li&gt;
&lt;li&gt;abstraction&lt;/li&gt;
&lt;li&gt;speed&lt;/li&gt;
&lt;li&gt;reduces nodejs load&lt;/li&gt;
&lt;li&gt;load balancing
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install nginx -y
sudo service nginx restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Install build-essentials&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install build-essential -y
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1 id="copy"&gt;  Copy project files &lt;/h1&gt;

&lt;p&gt;We can use &lt;a href="https://filezilla-project.org/"&gt;Filezilla&lt;/a&gt; to upload our project files to /var/www/litekart folder&lt;/p&gt;

&lt;h1 id="modules"&gt;  Install node modules &lt;/h1&gt;

&lt;p&gt;Navigate to /var/www/litekart and run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i --production
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1 id="pm2"&gt;  Setup PM2 &lt;/h1&gt;

&lt;h2&gt;
  
  
  Why PM2?
&lt;/h2&gt;

&lt;p&gt;In production environment we are going to use PM2. Because NodeJS commands are valid for that terminal session and kills the server once terminal session ends. To overcome this issue we are going to use a process manager that will demonize the node process and will keep it running for ever&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo npm install -g pm2
sudo pm2 --name litekart start npm -- start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The above will install PM2, execute npm start command of the project and start a PM2 process named litekart&lt;/p&gt;

&lt;h1 id="https"&gt;  Enable https &lt;/h1&gt;

&lt;p&gt;Our NodeJS app is up and running. Now we need to enable https which is a mandatory requirement now a days. We are going to use a free https certificate from Certbot. Run the following command and follow the instructions&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo certbot --nginx certonly
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The installed certificate is valid for 6 months. We need to setup auto renewal of the https certificate through cron job&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;crontab -e
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Enter the following at the end&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@monthly /home/ubuntu/letsencrypt/letsencrypt-auto certonly --reinstall --nginx -d www.litekart.in &amp;amp;&amp;amp; sudo service nginx reload
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This article was originally published on The &lt;a href="https://www.angularcode.com/configure-vultr-for-nodejs-deployment/"&gt;Angularcode&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>vultr</category>
      <category>node</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
