<?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: chakzefir</title>
    <description>The latest articles on DEV Community by chakzefir (@chakzefir).</description>
    <link>https://dev.to/chakzefir</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%2F13420%2F3772edf9-c4ea-4f38-a650-a915ed9f5fa5.jpeg</url>
      <title>DEV Community: chakzefir</title>
      <link>https://dev.to/chakzefir</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chakzefir"/>
    <language>en</language>
    <item>
      <title>How to develop under the TON using Javascript</title>
      <dc:creator>chakzefir</dc:creator>
      <pubDate>Sat, 03 Sep 2022 20:58:52 +0000</pubDate>
      <link>https://dev.to/chakzefir/how-to-develop-under-the-ton-using-javascript-2a3p</link>
      <guid>https://dev.to/chakzefir/how-to-develop-under-the-ton-using-javascript-2a3p</guid>
      <description>&lt;p&gt;This was originally posted on stackoverflow, but was later removed by the moderators because they called it a recommendation.&lt;/p&gt;

&lt;p&gt;I thought, ok, if it considered as a recommendation I should not throw it out. I do see value in it, why not to post it here. In the hope, that it might help someone.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tiny disclaimer about what is TON
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://ton.org/"&gt;TON&lt;/a&gt; (The Open Network) is a layer 1 blockchain, originally designed by Nikolay Durov and the &lt;a href="https://telegram.org/"&gt;Telegram&lt;/a&gt; team, now being created by the open community. It has all the potential to include all other blockchains under one roof and and change the rules of the game in the way people set up contracts with each other.To learn more, I recommend checking out the &lt;a href="https://ton.org/analysis"&gt;analysis&lt;/a&gt;, where it compares to other chains.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;As Javascript developer, I'm curious how to bootstrap and start working with TON blockchain without any knowledge of Func. Could you recommend any SDK, libraries and/or examples?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Answer
&lt;/h2&gt;

&lt;p&gt;It depends on how you want to interact with the TON blockchain.&lt;/p&gt;

&lt;h3&gt;
  
  
  📥 I just need to get some info from the blockchain
&lt;/h3&gt;

&lt;p&gt;Then it would be enough just to use &lt;strong&gt;HTTP API&lt;/strong&gt;. There are several open APIs which you could use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://toncenter.com/api/v2/"&gt;https://toncenter.com/api/v2/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tonapi.io/swagger-ui"&gt;https://tonapi.io/swagger-ui&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can find more detailed and up-to-date information about the API in dev docs: &lt;a href="https://ton.org/docs/#/apis/"&gt;https://ton.org/docs/#/apis/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🧾 I not only need to get information, but also publish (maybe even smart contracts)
&lt;/h3&gt;

&lt;p&gt;Every community discussion will advise you to use &lt;strong&gt;Func&lt;/strong&gt;, and they will be right. Simply because it is a native language for dealing with data structures and abstractions, which was originally designed for smart contracts in TON. It seems complicated, but only when you first start. Try out the first part of &lt;a href="https://society.ton.org/ton-hello-world-step-by-step-guide-for-writing-your-first-smart-contract-in-func"&gt;step by step first contract on Func&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But we're talking about &lt;strong&gt;Javascript&lt;/strong&gt; in this thread, so here's a list of available &lt;strong&gt;JS SDKs&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/toncenter/tonweb"&gt;https://github.com/toncenter/tonweb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/tonwhales/ton"&gt;https://github.com/tonwhales/ton&lt;/a&gt; - &lt;em&gt;works nice with TS&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/tonstack/ton3"&gt;https://github.com/tonstack/ton3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of the tools listed are &lt;strong&gt;open source&lt;/strong&gt;, so you can contribute.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧠 I'm ready to learn something new, but Func is too complicated. How about Solidity?
&lt;/h3&gt;

&lt;p&gt;I can understand you. Unfortunately, because of the &lt;a href="https://en.wikipedia.org/wiki/Actor_model"&gt;actor model&lt;/a&gt; and some other key concepts, &lt;strong&gt;it's impossible&lt;/strong&gt; to use Solidity to write smart contracts for TON.&lt;/p&gt;

&lt;p&gt;Fortunately, several enthusiasts are now working on &lt;a href="https://tact-lang.org/"&gt;Tact-lang&lt;/a&gt;, which should be much easier to understand and use. You can already use it for learning now, and then share feedback and contribute.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>blockchain</category>
      <category>ton</category>
      <category>web3</category>
    </item>
    <item>
      <title>How to setup basic SMTP for Ghost</title>
      <dc:creator>chakzefir</dc:creator>
      <pubDate>Tue, 22 Mar 2022 21:53:45 +0000</pubDate>
      <link>https://dev.to/chakzefir/how-to-basic-setup-mail-integration-with-ghost-223a</link>
      <guid>https://dev.to/chakzefir/how-to-basic-setup-mail-integration-with-ghost-223a</guid>
      <description>&lt;h2&gt;
  
  
  Disclaimer
&lt;/h2&gt;

&lt;p&gt;I've just started to use Ghost as a platform for blogs. Before that, I've been using Word Press, in one of my previous jobs. In my opinion, Ghost might become as popular as WP, while being very clear and easy for content makers and developers same time.&lt;/p&gt;

&lt;p&gt;What helped WP become so popular is the community, with many plugins, ready-to-go solutions, and how-tos, highlighting almost every moment and question that could arise around using this CMS.&lt;/p&gt;

&lt;p&gt;I'm writing this to contribute to the public knowledge base of Ghost, simply because if I had this guide, this would save me several hours.&lt;/p&gt;

&lt;h2&gt;
  
  
  About
&lt;/h2&gt;

&lt;p&gt;This article covers the basic SMTP setup for self-deployed Ghost instances. If you want to use Ghost from the box without customisation and you are not ready to write code and edit JSON files, then I highly recommend you to use Ghost Pro: &lt;a href="https://account.ghost.org/signup" rel="noopener noreferrer"&gt;https://account.ghost.org/signup&lt;/a&gt; (I have no ref program or bonuses, this is just kind advice)&lt;/p&gt;

&lt;p&gt;If you are trying to set up Ghost and don't understand how to deal with emails, this is for you 📧&lt;/p&gt;

&lt;h2&gt;
  
  
  Ghost emails context
&lt;/h2&gt;

&lt;p&gt;Ghost have great documentation and community. There are two cases with emails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bulk — sending newsletters, you could pay for any dedicated service and use it&lt;/li&gt;
&lt;li&gt;Transactional — system stuff to work correctly with CMS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs9ngl9dudcurbpw9ggz5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs9ngl9dudcurbpw9ggz5.png" alt="Image description"&gt;&lt;/a&gt; &lt;em&gt;from &lt;a href="https://ghost.org/docs/faq/mailgun-newsletters/" rel="noopener noreferrer"&gt;https://ghost.org/docs/faq/mailgun-newsletters/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Bulk usage is clear. You have to land your SMTP and the whole flow, or just pay for it and setup. But what if you need SMTP for Transactional emails only. Let's see what options you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setup SMTP server manually (spend time and/or money)&lt;/li&gt;
&lt;li&gt;Use one of the listed services (spend time and/or money)&lt;/li&gt;
&lt;li&gt;Gmail? What's up with Gmail?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;Almost everybody has Gmail, right? But a small amount of those knows, that it also includes free SMTP service, which is the same as other Google products: fast&amp;amp;reliable.&lt;/p&gt;

&lt;p&gt;Everything you need is your email and dedicated app password (for security reasons).&lt;/p&gt;

&lt;p&gt;🗝 To generate &lt;em&gt;this password&lt;/em&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://myaccount.google.com/apppasswords" rel="noopener noreferrer"&gt;https://myaccount.google.com/apppasswords&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Enter your regular password from your Google account (this is security settings)&lt;/li&gt;
&lt;li&gt;Select app, choose Other, and put the name (i.e SMTP)&lt;/li&gt;
&lt;li&gt;Now copy your password and write it down (you will have no chance to see it for the second time here)&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;For Ghost setup, I was using DO droplet, you could use a different way, but the whole flow should be similar or the same.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;📧 Now, to setup SMTP for your Ghost:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to your project directory &lt;code&gt;cd /var/www/ghost&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Open to edit your &lt;code&gt;config.production.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Copy and paste config object for &lt;code&gt;mail&lt;/code&gt; and fill &lt;code&gt;user&lt;/code&gt; and &lt;code&gt;pass&lt;/code&gt; with your creds&lt;/li&gt;
&lt;/ol&gt;

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

"mail": {
    "transport": "SMTP",
    "options": {
      "service": "Google",
      "host": "smtp.gmail.com",
      "port": 587,
      "auth": {
        "user": "your@google.email",
        "pass": "this password"
      }
    }
  },


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You could burn down the paper with &lt;em&gt;this password&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;As a result, all your transactional emails should work fine without any additional pain in the ass. For example, now you could invite somebody else as a content contributor to your website.&lt;/p&gt;

&lt;h2&gt;
  
  
  To conclude
&lt;/h2&gt;

&lt;p&gt;If it will help at least one person, then these two hours were not a waste.&lt;/p&gt;

&lt;p&gt;Any questions, experience, feedback? Feel free to drop a thoughtful comment. &lt;/p&gt;

&lt;p&gt;Have a nice day 🌞&lt;/p&gt;

&lt;p&gt;p.s Thanks &lt;a href="https://unsplash.com/@yannikm?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Yannik Mika&lt;/a&gt; for suitable bg&lt;/p&gt;

</description>
      <category>jamstack</category>
      <category>ghost</category>
      <category>node</category>
      <category>writing</category>
    </item>
  </channel>
</rss>
