<?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>Forem: Pavel Svitek</title>
    <description>The latest articles on Forem by Pavel Svitek (@svitekpavel).</description>
    <link>https://forem.com/svitekpavel</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%2F124827%2Fed34c8f7-0b2f-4adf-a806-fa1c11342f19.jpeg</url>
      <title>Forem: Pavel Svitek</title>
      <link>https://forem.com/svitekpavel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/svitekpavel"/>
    <language>en</language>
    <item>
      <title>Boilerplate: NuxtJS + Express server + Jest, all in Typescript</title>
      <dc:creator>Pavel Svitek</dc:creator>
      <pubDate>Mon, 13 Apr 2020 12:59:34 +0000</pubDate>
      <link>https://forem.com/svitekpavel/boilerplate-nuxtjs-with-express-server-all-in-typescript-2fm2</link>
      <guid>https://forem.com/svitekpavel/boilerplate-nuxtjs-with-express-server-all-in-typescript-2fm2</guid>
      <description>&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%2Fi%2Fopft9v0u4qxf68qxsurv.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%2Fi%2Fopft9v0u4qxf68qxsurv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was searching for a starter project which would combine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NuxtJS in Typescript (+best practises for components)&lt;/li&gt;
&lt;li&gt;ExpressJS as backend in Typescript&lt;/li&gt;
&lt;li&gt;in one repository&lt;/li&gt;
&lt;li&gt;with configured Jest runners for backend and frontend&lt;/li&gt;
&lt;li&gt;Dockerfile [bonus]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But I haven't found any.&lt;/p&gt;

&lt;p&gt;So I created one:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/svitekpavel/nuxtjs-express-typescript" rel="noopener noreferrer"&gt;https://github.com/svitekpavel/nuxtjs-express-typescript&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take a look at &lt;code&gt;README.md&lt;/code&gt; but also at &lt;code&gt;components/User.vue&lt;/code&gt; and &lt;code&gt;components/User2.vue&lt;/code&gt; for sample usage in components.&lt;/p&gt;

&lt;p&gt;I hope it helps.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>vue</category>
      <category>nuxt</category>
    </item>
    <item>
      <title>How to write a Backoff function in Typescript</title>
      <dc:creator>Pavel Svitek</dc:creator>
      <pubDate>Mon, 13 Apr 2020 10:53:23 +0000</pubDate>
      <link>https://forem.com/svitekpavel/how-to-write-a-backoff-function-in-typescript-n4d</link>
      <guid>https://forem.com/svitekpavel/how-to-write-a-backoff-function-in-typescript-n4d</guid>
      <description>&lt;p&gt;Imagine you want to call your backend API (or other network operation) but it fails.&lt;/p&gt;

&lt;p&gt;You would like to call it 2 or 3 times more with some delay. Much like how Gmail works when it tries to connect back after losing a connection.&lt;/p&gt;

&lt;p&gt;The code below implements an async function that works just like that. &lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;The code should be self-explainable, but feel free to ask in comments if anything is not clear.&lt;/p&gt;

&lt;p&gt;The KUDOS for implementation of the original function &lt;code&gt;backoffOrig()&lt;/code&gt; goes to Saša Savić &lt;br&gt;
&lt;a href="https://www.linkedin.com/feed/update/urn:li:activity:6655380458282594304"&gt;https://www.linkedin.com/feed/update/urn:li:activity:6655380458282594304&lt;/a&gt;&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>backoff</category>
      <category>network</category>
    </item>
  </channel>
</rss>
