<?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: Bruski Wong</title>
    <description>The latest articles on DEV Community by Bruski Wong (@bruceeewong).</description>
    <link>https://dev.to/bruceeewong</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%2F365582%2F7fbe2734-64b5-452f-bc96-d8e32deddc3c.jpeg</url>
      <title>DEV Community: Bruski Wong</title>
      <link>https://dev.to/bruceeewong</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bruceeewong"/>
    <language>en</language>
    <item>
      <title>Deploy your blog via let.sh</title>
      <dc:creator>Bruski Wong</dc:creator>
      <pubDate>Thu, 12 May 2022 15:49:34 +0000</pubDate>
      <link>https://dev.to/bruceeewong/deploy-your-blog-via-letsh-2ein</link>
      <guid>https://dev.to/bruceeewong/deploy-your-blog-via-letsh-2ein</guid>
      <description>&lt;p&gt;Hey guys, I'm Bruski, a regular everyday normal engineer🎵 👨🏻‍💻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Say, do you guys wanna setup a blog site of your own?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PPVwFo7t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FKjyt-n0N-3.png%3Falt%3Dmedia%26token%3D6ba93ca1-a137-4230-83b1-321d5e426c84" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PPVwFo7t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FKjyt-n0N-3.png%3Falt%3Dmedia%26token%3D6ba93ca1-a137-4230-83b1-321d5e426c84" alt="Image from: http://seoexperts4all.com/makes-blogs-powerful-tool-seo/" width="680" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A blog site is a great place for us to record down our notes, daily thoughts or publish professional articles. By writing blogs, we can benefit from reviewing and outputing what we have learned. What's more, thanks to the searching engine like Google, our posts might be searched and visited by anyone in the world, that means someone might get inspired by your articles and your influence on the Internet could eventually scale up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eYXm6lBZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FqCY0XuBdEE.png%3Falt%3Dmedia%26token%3Dc722a327-d65b-474a-8913-91724c90e160" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eYXm6lBZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FqCY0XuBdEE.png%3Falt%3Dmedia%26token%3Dc722a327-d65b-474a-8913-91724c90e160" alt="Blogging" width="880" height="785"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So back to today's topic, I'm gonna show you how to pick a blog framework and deploy it in seconds via &lt;a href="https://let.sh/"&gt;let.sh&lt;/a&gt;, the one-command deployment tool.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--42Ul1Wwq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FnmnehSsVkd.png%3Falt%3Dmedia%26token%3Dbe22367a-0527-4a54-a451-2e7318d2ee8b" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--42Ul1Wwq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FnmnehSsVkd.png%3Falt%3Dmedia%26token%3Dbe22367a-0527-4a54-a451-2e7318d2ee8b" alt="Feels good man, says Pepe" width="880" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For more infomation about let.sh, please visit &lt;a href="https://let.sh/"&gt;the offical website&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;What you are expected to learn:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚀 deploy your blog site in seconds&lt;/li&gt;
&lt;li&gt;⛳️ own a website with custom domains and automated HTTPs connections.&lt;/li&gt;
&lt;li&gt;⚒️ get a powerful console of your blog site for monitoring and benchmark&lt;/li&gt;
&lt;li&gt;👨🏻‍💻 enjoy a simple yet happy deployment experience&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Pick a blog framework
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;If you have already setup your blog, just skip to the next chapter ✅&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Typically, there are two types of blog framework: &lt;code&gt;Static-Side Generating&lt;/code&gt; and &lt;code&gt;Server-Side Rendering&lt;/code&gt;. (check &lt;a href="https://medium.com/codex/web-design-patterns-ssr-ssg-and-spa-fadad7673dfe"&gt;this post&lt;/a&gt; for more information). As for tutorial purpose, we choose the type &lt;strong&gt;Static-Side Generating&lt;/strong&gt; as our choice. Because this type of framework can generate html files at build time on your local machine, so we can simply transform our posts to a bunch of static files rather than storing them into the database.&lt;/p&gt;

&lt;p&gt;There are also many alternatives for selecting Static-Side Generating blog framework such as &lt;code&gt;Hexo&lt;/code&gt;, &lt;code&gt;Gatsby&lt;/code&gt;, &lt;code&gt;Next.js&lt;/code&gt; (more details &lt;a href="https://jamstack.org/generators/"&gt;here&lt;/a&gt;). We will pick &lt;a href="https://hexo.io/"&gt;Hexo&lt;/a&gt; as our framework because it is a fast, simple &amp;amp; powerful blog framework.&lt;/p&gt;

&lt;p&gt;According to &lt;a href="https://hexo.io/docs/#Installation"&gt;the installation doc of hexo&lt;/a&gt;, we should install its cli firstly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install hexo-cli -g
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then initialize our blog project with its name &lt;code&gt;my_blog&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hexo init my_blog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If everything goes right, we'll get our project as below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YuruOFYY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FMMLKVXTRbI.png%3Falt%3Dmedia%26token%3Da860c705-ae8f-4de2-9862-1a3e1cbdbcf1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YuruOFYY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FMMLKVXTRbI.png%3Falt%3Dmedia%26token%3Da860c705-ae8f-4de2-9862-1a3e1cbdbcf1" alt="code structure" width="880" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can run the &lt;code&gt;npm run server&lt;/code&gt; command to preview our blog site locally:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9iKRYQIY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FUEp1lndOKV.png%3Falt%3Dmedia%26token%3D5fa84b78-a245-489a-849e-83297ad5a2f0" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9iKRYQIY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FUEp1lndOKV.png%3Falt%3Dmedia%26token%3D5fa84b78-a245-489a-849e-83297ad5a2f0" alt="local preview for the blog site" width="880" height="524"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Install let.sh real quick
&lt;/h2&gt;

&lt;p&gt;Next, install let.sh tool&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# For MacOS / Linux User
curl -o- -sL https://install.let-sh.com/install.sh | bash

# For Windows User
iwr https://install.let-sh.com/install.ps1 -useb | iex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can verify the installation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;lets help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZHYPA56b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FCms5uYsSIU.png%3Falt%3Dmedia%26token%3D0e9f4186-b947-47d7-96ff-4ea215ae6f2e" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZHYPA56b--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FCms5uYsSIU.png%3Falt%3Dmedia%26token%3D0e9f4186-b947-47d7-96ff-4ea215ae6f2e" alt="screenshot of the cli - lets help" width="880" height="786"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: let's login
&lt;/h2&gt;

&lt;p&gt;Before we use let.sh, we should login our github account in the terminal. Just type in the command and hit enter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;lets login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Select &lt;code&gt;Github&lt;/code&gt; login option&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r5idWuJw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FHvFiy-yRd0.png%3Falt%3Dmedia%26token%3D95c352c8-658c-45f1-8750-6a61d59b838c" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r5idWuJw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FHvFiy-yRd0.png%3Falt%3Dmedia%26token%3D95c352c8-658c-45f1-8750-6a61d59b838c" alt="screenshot of the cli - lets login" width="632" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Authorize let.sh to access the specified permissions to your github account:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--740FR0U_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FcMgIh6fc_3.png%3Falt%3Dmedia%26token%3D73d23143-95c9-4590-8459-f3e2d1cee0fa" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--740FR0U_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FcMgIh6fc_3.png%3Falt%3Dmedia%26token%3D73d23143-95c9-4590-8459-f3e2d1cee0fa" alt="github auth page" width="880" height="996"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We'll see the success result page of let.sh if the authorization has been approved.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tAPoZWcL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FQfsek6_c8f.png%3Falt%3Dmedia%26token%3Dbb91287b-088f-4399-bd92-acc155dcf4c9" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tAPoZWcL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FQfsek6_c8f.png%3Falt%3Dmedia%26token%3Dbb91287b-088f-4399-bd92-acc155dcf4c9" alt="login result page" width="880" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: let's deploy
&lt;/h2&gt;

&lt;p&gt;Back to the terminal, now we can finally deploy our blog site to the Internet.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note that our terminal is at the root path of our project&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;No complicated actions, just goes with the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;lets deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just a few seconds later, the whole deployment has been done elegantly by let.sh.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dZt5MsKt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FCqISxzTw5i.png%3Falt%3Dmedia%26token%3Dd0c8bae3-287c-4ac9-9e5f-feb357a0561a" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dZt5MsKt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FCqISxzTw5i.png%3Falt%3Dmedia%26token%3Dd0c8bae3-287c-4ac9-9e5f-feb357a0561a" alt="screenshot of the cli - lets deploy" width="834" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations, now we are free to visit our alive blog site 🎉&lt;/p&gt;

&lt;p&gt;&lt;a href="https://my_blog-bruceeewong.let.sh"&gt;https://my_blog-bruceeewong.let.sh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--htxVAqAC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252F-7-bPYMw9s.png%3Falt%3Dmedia%26token%3D12f76dc6-2254-432a-a9c9-5dc0900eab00" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--htxVAqAC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252F-7-bPYMw9s.png%3Falt%3Dmedia%26token%3D12f76dc6-2254-432a-a9c9-5dc0900eab00" alt="online blog site" width="880" height="526"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Share it with your fellows right now, shall we? 🍻&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced techniques
&lt;/h2&gt;

&lt;p&gt;As we can see, let.sh automatically detects the type of our framework and triggers the appropriate building action. After building, it uploads all the files to the cloud storage and provides the accessible link that equipped with HTTPs. All these complicated things are done in just one command &lt;code&gt;lets deploy&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Meanwhile, &lt;strong&gt;it provides a detail link at the bottom of the output info&lt;/strong&gt;. We visit the &lt;a href="https://let.sh/console/projects/my_blog/details"&gt;https://let.sh/console/projects/my_blog/details&lt;/a&gt; and it will navigate to the console of our project, where we can check the status of each deployment and the benchmark of our blog pages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rAVcOxGD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FvkzLQ2PTkJ.png%3Falt%3Dmedia%26token%3Da9d10b53-9d6b-462c-a4ba-e65110389fde" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rAVcOxGD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs%252Fapp%252FBruski%252FvkzLQ2PTkJ.png%3Falt%3Dmedia%26token%3Da9d10b53-9d6b-462c-a4ba-e65110389fde" alt="console panel for the project" width="880" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What else, &lt;strong&gt;how about customize the domain name for your blog site instead of the given one?&lt;/strong&gt; No problem, just enter the command &lt;code&gt;lets link &amp;lt;domain_name&amp;gt;&lt;/code&gt; to achieve the goal. We can setup unique subdomain of &lt;code&gt;.let.sh&lt;/code&gt; immediately, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;lets link bruce_blog.let.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If succeeded, we can visit via our custom domain name &lt;a href="https://bruce_blog.let.sh"&gt;https://bruce_blog.let.sh&lt;/a&gt; 🎉&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you want to assign your own domain name, please follow &lt;a href="https://docs.let.sh/cli/commands#link"&gt;the instructions&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;We've finish the deployment of our blog site with let.sh in seconds!&lt;/p&gt;

&lt;p&gt;If you have any questions or advanced demands, go visit the documents of let.sh: &lt;a href="https://docs.let.sh/"&gt;https://docs.let.sh/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy coding ;)&lt;/p&gt;

</description>
      <category>blog</category>
      <category>webdev</category>
      <category>deployment</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
