<?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: Krishna Pravin</title>
    <description>The latest articles on DEV Community by Krishna Pravin (@askrishnapravin).</description>
    <link>https://dev.to/askrishnapravin</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%2F178532%2F2faa9f0e-a3b1-4be1-96f3-ad2c2afaba19.jpg</url>
      <title>DEV Community: Krishna Pravin</title>
      <link>https://dev.to/askrishnapravin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/askrishnapravin"/>
    <language>en</language>
    <item>
      <title>Recommend VS Code extensions to your future teammates</title>
      <dc:creator>Krishna Pravin</dc:creator>
      <pubDate>Sat, 28 Nov 2020 03:08:41 +0000</pubDate>
      <link>https://dev.to/askrishnapravin/recommend-vs-code-extensions-to-your-future-teammates-4gkb</link>
      <guid>https://dev.to/askrishnapravin/recommend-vs-code-extensions-to-your-future-teammates-4gkb</guid>
      <description>&lt;p&gt;If you are using an awesome VS Code extension and you want to share it with your current team members and future ones, you can use this feature of VS Code.&lt;/p&gt;

&lt;h1&gt;
  
  
  Configuring recommended extensions
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Open the command palette &lt;code&gt;CMD + Shift + p&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;Configure Recommended Extensions&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A new file called &lt;code&gt;extensions.json&lt;/code&gt; will be created under &lt;code&gt;.vscode/&lt;/code&gt; in the root of the project.&lt;/li&gt;
&lt;li&gt;Place the cursor within the recommendations array and press &lt;code&gt;CMD + i&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Select the required extensions from the list of installed extensions and save the file.&lt;/li&gt;
&lt;li&gt;Include this file in your source control tools(we use Git).&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%2Fi%2F1n939dnihki157z5jbl0.gif" 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%2F1n939dnihki157z5jbl0.gif" alt="Create VSCode extensions.json file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Installing recommended extensions
&lt;/h1&gt;

&lt;p&gt;Once the configuration is done, everyone who opens your project will get a recommendation notification like this&lt;br&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%2Fyvs88ge27z0lf4cpza30.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%2Fyvs88ge27z0lf4cpza30.png" alt="Install recommended extensions VSCode notification"&gt;&lt;/a&gt;From here the extensions are just a click away.&lt;br&gt;
On clicking &lt;code&gt;Install&lt;/code&gt; all recommended extensions will be installed.&lt;/p&gt;

&lt;p&gt;For any reasons, if the notification doesn't show up we can manually open up Recommended Extensions settings&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the command palette &lt;code&gt;CMD + Shift + p&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;Show Recommended Extensions&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;All the extensions can be installed together or only required extensions can be installed&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%2Fi%2Fgcgi8seqo66u2a978zvd.gif" 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%2Fgcgi8seqo66u2a978zvd.gif" alt="Using command palette to open Recommended Extensions settings"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;CMD + i&lt;/code&gt; is one of the default VSCode shortcuts to trigger suggestions/IntelliSense.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;blockquote&gt;
&lt;p&gt;Keystrokes and mouse clicks can be made visible in VSCode by turning on the &lt;code&gt;Screencast Mode&lt;/code&gt; from the command palette.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Feel free to comment your thoughts on this. Let me know if you find this useful, do share your tips and tricks for utilising VSCode to its fullest.&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>texteditor</category>
      <category>extensions</category>
    </item>
    <item>
      <title>for loop vs .map() for making multiple API calls</title>
      <dc:creator>Krishna Pravin</dc:creator>
      <pubDate>Thu, 14 May 2020 04:42:17 +0000</pubDate>
      <link>https://dev.to/askrishnapravin/for-loop-vs-map-for-making-multiple-api-calls-3lhd</link>
      <guid>https://dev.to/askrishnapravin/for-loop-vs-map-for-making-multiple-api-calls-3lhd</guid>
      <description>&lt;p&gt;&lt;code&gt;Promise&lt;/code&gt; / &lt;code&gt;async-await&lt;/code&gt; is used for making API calls.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`https://jsonplaceholder.typicode.com/todos/1`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Assuming I have a list of ids of todo items and I want the &lt;code&gt;title&lt;/code&gt; of all them then I shall use the below snippet inside an &lt;code&gt;async&lt;/code&gt; function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todoIdList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;todoIdList&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`https://jsonplaceholder.typicode.com/todos/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This same can be written with any of these &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;for...in&lt;/code&gt;, &lt;code&gt;for...of&lt;/code&gt; loops.&lt;/p&gt;

&lt;p&gt;Assuming each API request arbitrarily takes 100ms exactly, the total time taken for getting the details of four todo items will have to be greater than 400ms if we use any of the above-mentioned loops.&lt;/p&gt;

&lt;p&gt;This execution time can be drastically reduced by using &lt;code&gt;.map()&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todoIdList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;todoIdList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`https://jsonplaceholder.typicode.com/todos/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adding timers&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todoIdList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;for {}&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;todoIdList&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`https://jsonplaceholder.typicode.com/todos/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timeEnd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;for {}&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.map()&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;todoIdList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`https://jsonplaceholder.typicode.com/todos/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timeEnd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.map()&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Reason
&lt;/h2&gt;

&lt;h3&gt;
  
  
  for loop
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;for&lt;/code&gt; loop goes to the next iteration only after the whole block's execution is completed. In the above scenario only after both the promises(await) gets &lt;strong&gt;resolved&lt;/strong&gt;, for loop moves to the next iteration and makes the API call for the next todo item.&lt;/p&gt;

&lt;h3&gt;
  
  
  .map()
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;.map()&lt;/code&gt; moves on to the next item as soon as a  promise is &lt;strong&gt;returned&lt;/strong&gt;. It does not wait until the promise is resolved. In the above scenario, .map() does not wait until the response for todo items comes from the server. It makes all the API calls one by one and for each API call it makes, a respective promise is returned. &lt;code&gt;Promise.all&lt;/code&gt; waits until all of these promises are resolved.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;async/await&lt;/code&gt; is &lt;em&gt;syntactic sugar&lt;/em&gt; for &lt;code&gt;Promises&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will be more clear if the same code is written without &lt;code&gt;async/await&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;todoIdList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;time&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.map()&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;todoIdList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`https://jsonplaceholder.typicode.com/todos/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
              &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;todo&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;todo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
              &lt;span class="p"&gt;})&lt;/span&gt;
          &lt;span class="p"&gt;})&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timeEnd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.map()&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is not possible to mimic the respective code for &lt;code&gt;for&lt;/code&gt; loop by replacing &lt;code&gt;async/await&lt;/code&gt; with &lt;code&gt;Promises&lt;/code&gt; because, the control which triggers the next iteration will have to written within the &lt;code&gt;.then()&lt;/code&gt; block. This piece of code will have to be created within the JS engine.&lt;/p&gt;

&lt;p&gt;All the snippets are working code, you can try it directly in the browser console.&lt;br&gt;
Note:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;snippets need to be enclosed within an async function except for the last one&lt;/li&gt;
&lt;li&gt;use &lt;code&gt;Axios&lt;/code&gt; or any other suitable library if &lt;code&gt;fetch&lt;/code&gt; is not available.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let me know if there is an even better and easy/short way of making API calls.&lt;/p&gt;

&lt;p&gt;Also, do not forget to mention any mistakes I've made or tips, suggestions to improve this content.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>api</category>
      <category>async</category>
    </item>
    <item>
      <title>How to edit files in a Heroku dyno and persist it</title>
      <dc:creator>Krishna Pravin</dc:creator>
      <pubDate>Mon, 11 Nov 2019 16:08:13 +0000</pubDate>
      <link>https://dev.to/askrishnapravin/how-to-edit-files-in-a-heroku-dyno-and-persist-it-4fmo</link>
      <guid>https://dev.to/askrishnapravin/how-to-edit-files-in-a-heroku-dyno-and-persist-it-4fmo</guid>
      <description>&lt;p&gt;If you edit files present in a Heroku dyno, the edited file comes back to its initial state after some time. This is because Heroku restarts the dynos randomly for keeping them in good health.&lt;/p&gt;

&lt;h1&gt;
  
  
  Heroku Deployment Process:
&lt;/h1&gt;

&lt;p&gt;skip this if you are familiar&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initiating deployment:

&lt;ul&gt;
&lt;li&gt;Heroku deployment can be triggered manually or it can be configured to get triggered automatically by connecting Heroku to GitHub.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;During deployment: 

&lt;ul&gt;
&lt;li&gt;Heroku builds the application based on default settings or based on the configured build packs.&lt;/li&gt;
&lt;li&gt;At the end of this process, a slug will be created. A slug is nothing but the files that were generated during the build. A slug is similar to a docker image (not exactly).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The created slug is deployed in AWS EC2 instances, which is called as dynos by Heroku.&lt;/li&gt;
&lt;li&gt;At random intervals, the slug is redeployed for maintaining the health of the dynos &lt;a href="https://devcenter.heroku.com/articles/dynos#automatic-dyno-restarts"&gt;#ref&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;👆This is the reason why files edited in a dyno will be reset to its initial state.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;👻&lt;/p&gt;

&lt;h3&gt;
  
  
  So, How can we make changes to the files in a Heroku dyno which does not reset to its previous version?
&lt;/h3&gt;

&lt;p&gt;One straightforward solution is to make the changes in the source code and redeploy the application.&lt;/p&gt;

&lt;p&gt;Yes, this is one way of achieving it.&lt;/p&gt;

&lt;p&gt;But, You may wonder why there would be another scenario. One rare scenario is: &lt;em&gt;You want to change a HTML file (urgent client requirement) that is already part of an application in the production environment, but your build process is getting timed out and you are not able to find the reason&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So, The other solution is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;By editing the previously generated slug and using the edited slug in the required application/environment. &lt;a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Steps to edit the slug and deploy it:
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;(100% no build process is required)&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;ol&gt;

&lt;li&gt;Download Heroku CLI
 &lt;ul&gt;&lt;li&gt;&lt;a href="https://devcenter.heroku.com/articles/heroku-cli#download-and-install"&gt;https://devcenter.heroku.com/articles/heroku-cli#download-and-install&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;Login to your Heroku account using the CLI
 &lt;ul&gt;
&lt;li&gt;&lt;code&gt;$ heroku login&lt;/code&gt;&lt;/li&gt;

 &lt;li&gt;This will take you to a browser to fill the login form.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;List all the deployed applications
 &lt;ul&gt;&lt;li&gt;&lt;code&gt;$ heroku list --all&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;Get the unique slug identifier and version number
 &lt;ul&gt;
&lt;li&gt;&lt;code&gt;$ heroku slugs -a your_application_name&lt;/code&gt;&lt;/li&gt;

 &lt;li&gt;Use the name of the application which has the files you want to edit.&lt;/li&gt;

 &lt;li&gt;You will get all the unique slug identifiers along with their version numbers that are generated and used by your application until now.&lt;/li&gt;

 &lt;li&gt;This version number can be verified from the dashboard &lt;a href="https://dashboard.heroku.com/apps/your_application_name/activity"&gt;https://dashboard.heroku.com/apps/your_application_name/activity&lt;/a&gt;
&lt;/li&gt;

 &lt;li&gt;If you have too many deployments, store the list to a file &lt;/li&gt;

 &lt;li&gt;&lt;code&gt;$ heroku slugs -a your_application_name &amp;gt; slugsList.txt&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;Download the slug
 &lt;ul&gt;
&lt;li&gt;To download, you need an additional Heroku CLI plugin&lt;/li&gt;

 &lt;li&gt;Install the additional plugin using &lt;code&gt;heroku plugins:install heroku-slugs&lt;/code&gt;
&lt;/li&gt;

 &lt;li&gt;Then &lt;code&gt;$ heroku slugs:download your_unique_slug_identifier -a your_application_name&lt;/code&gt;
&lt;/li&gt;

 &lt;li&gt;This will download and create a folder with the name of your application.&lt;/li&gt;

&lt;li&gt;The created folder will contain a directory called &lt;code&gt;app&lt;/code&gt; which contains the generated source code and a &lt;code&gt;slug.tar.gz&lt;/code&gt; file, which is the compressed version the source code.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;Edit the required files present within the &lt;code&gt;./app&lt;/code&gt; directory.&lt;/li&gt;

&lt;li&gt;Create new slug archive
 &lt;ul&gt;

 &lt;li&gt;Heroku currently has limited tar-file compatibility. Please use &lt;a href="http://www.gnu.org/software/tar/tar.html"&gt;GNU Tar&lt;/a&gt; (and not &lt;code&gt;bsdtar&lt;/code&gt;) when creating slug archives. You can check your tar version with &lt;code&gt;tar --version&lt;/code&gt;. &lt;/li&gt;

 &lt;li&gt;While running the below command, you should be in the same directory level as that of &lt;code&gt;./app&lt;/code&gt; directory.&lt;/li&gt;

 &lt;li&gt;&lt;code&gt;$ tar czfv slug.tgz ./app&lt;/code&gt;&lt;/li&gt;

 &lt;li&gt;
&lt;code&gt;slug.tgz&lt;/code&gt; is the name of the archive that will be created&lt;/li&gt;

 &lt;li&gt;
&lt;code&gt;c&lt;/code&gt; - create, &lt;code&gt;z&lt;/code&gt; - gzip format, &lt;code&gt;v&lt;/code&gt; - show status, &lt;code&gt;f&lt;/code&gt; - file name and location&lt;/li&gt;

&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;Create a unique identifier for the new slug
&lt;ul&gt;
&lt;li&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Accept: application/vnd.heroku+json; version=3'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"process_types":{"your_process_type":"your_command"}}'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-n&lt;/span&gt; https://api.heroku.com/apps/your_application_name/slugs
&lt;/code&gt;&lt;/pre&gt;



&lt;/li&gt;

&lt;li&gt;If you don't know your process type(s) and the respective commands, then go to &lt;a href="https://dashboard.heroku.com/apps/your_application_name/resources"&gt;https://dashboard.heroku.com/apps/your_application_name/resources&lt;/a&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w6P6yIve--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.jsdelivr.net/gh/KrishnaPravin/my-blog-images/How-to-edit-files-in-a-Heroku-dyno-and-persist-it/process-types.png" alt="process types"&gt;
&lt;/li&gt;

 &lt;li&gt;For my application, I have two process types. So I will be sending this data in the API call

&lt;p&gt;&lt;code&gt;{"process_types":{"web": "bundle exec puma -p $PORT -C ./config/puma.rb", "worker": "bundle exec rake jobs:work"}}&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;

 &lt;li&gt;
&lt;code&gt;-n&lt;/code&gt; flag tells curl to read the credentials for &lt;code&gt;api.heroku.com&lt;/code&gt; from &lt;code&gt;~/.netrc&lt;/code&gt; and automatically sets the &lt;code&gt;Authorization&lt;/code&gt; header.&lt;/li&gt;

 &lt;li&gt;
&lt;code&gt;-H&lt;/code&gt; flag sets the respective header&lt;/li&gt;

 &lt;li&gt;
&lt;code&gt;-d&lt;/code&gt; flag represents the data to be sent in HTTP POST request&lt;/li&gt;

 &lt;li&gt;You will get a response like this
&lt;ul&gt;&lt;li&gt;


&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"blob"&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"method"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"put"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://s3-external-1.amazonaws.com/herokuslugs/heroku.com/v1/d969e0b3-9892-4567-7642-1aa1d1108bc3?AWSAccessKeyId=AKIAJWLOWWHPBWQOPJZQ&amp;amp;Signature=2oJJEtemTp7h0qTH2Q4B2nIUY9w%3D&amp;amp;Expires=1381273352"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"commit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"created_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"2013-10-08T22:04:13Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"d969e0b3-9892-3113-7653-1aa1d1108bc3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"process_types"&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"web"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"node-v0.10.20-linux-x64/bin/node web.js"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"updated_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"2013-10-08T22:04:13Z"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;



&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;

 &lt;li&gt;
&lt;code&gt;blob.url&lt;/code&gt; - AWS S3 URL for the new slug&lt;/li&gt;

 &lt;li&gt;
&lt;code&gt;id&lt;/code&gt; - Unique identifier for the new slug&lt;/li&gt;

 &lt;li&gt;&lt;a href="https://devcenter.heroku.com/articles/platform-api-deploying-slugs#publish-to-the-platform"&gt;Heroku docs reference&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;Upload the created slug archive to AWS S3

&lt;ul&gt;
&lt;li&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; PUT &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type:"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--data-binary&lt;/span&gt; @slug.tgz &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="s2"&gt;"https://your_aws_s3_blob_url"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;

&lt;li&gt;
&lt;code&gt;slug.tgz&lt;/code&gt; is the name of the archive file we have created.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Create a new release for your application which will use the new slug archive which we have created and uploaded to AWS S3

&lt;ul&gt;&lt;li&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Accept: application/vnd.heroku+json; version=3"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"slug":"your_unique_identifier_of_new_slug"}'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-n&lt;/span&gt; https://api.heroku.com/apps/your_application_name/releases
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;&lt;/ul&gt;


&lt;/li&gt;

&lt;blockquote&gt;
&lt;p&gt;You can verify the release status in the Heroku dashboard or using &lt;code&gt;heroku releases --app your_application_name&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;/ol&gt;

</description>
      <category>heroku</category>
      <category>slug</category>
      <category>dyno</category>
      <category>file</category>
    </item>
  </channel>
</rss>
