<?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: Cesar Muñoz</title>
    <description>The latest articles on DEV Community by Cesar Muñoz (@cemdev).</description>
    <link>https://dev.to/cemdev</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%2F437225%2Fc228e427-1244-4d2c-a64a-6c6f2583f121.jpeg</url>
      <title>DEV Community: Cesar Muñoz</title>
      <link>https://dev.to/cemdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cemdev"/>
    <language>en</language>
    <item>
      <title>How to create a cron job in Vercel</title>
      <dc:creator>Cesar Muñoz</dc:creator>
      <pubDate>Mon, 20 Mar 2023 11:58:22 +0000</pubDate>
      <link>https://dev.to/cemdev/how-to-create-a-cron-job-in-vercel-57le</link>
      <guid>https://dev.to/cemdev/how-to-create-a-cron-job-in-vercel-57le</guid>
      <description>&lt;p&gt;Code: &lt;a href="https://github.com/cesmunoz/vercel-cron-example" rel="noopener noreferrer"&gt;https://github.com/cesmunoz/vercel-cron-example&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Vercel release a few weeks ago a feature that we were waiting for a long time ago. This feature was already on other platforms as Netlify, so I’m glad that we have it now on this platform.&lt;/p&gt;

&lt;p&gt;A corn job is basically a work schedule that runs assignments at a certain specific time, these activities are called Cron Jobs.&lt;/p&gt;

&lt;p&gt;Some examples of cron jobs can be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;send a notification to a user at 9 AM&lt;/li&gt;
&lt;li&gt;do a process every 15 minutes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The schema of a cron job is the following:&lt;/p&gt;

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

&lt;span class="c"&gt;# ┌───────────── minute (0 - 59)&lt;/span&gt;
&lt;span class="c"&gt;# │ ┌───────────── hour (0 - 23)&lt;/span&gt;
&lt;span class="c"&gt;# │ │ ┌───────────── day of the month (1 - 31)&lt;/span&gt;
&lt;span class="c"&gt;# │ │ │ ┌───────────── month (1 - 12)&lt;/span&gt;
&lt;span class="c"&gt;# │ │ │ │ ┌───────────── day of the week (0 - 6) (0 is Sunday, 6 is Saturday)&lt;/span&gt;
&lt;span class="c"&gt;# │ │ │ │ │&lt;/span&gt;
&lt;span class="c"&gt;# │ │ │ │ │&lt;/span&gt;
&lt;span class="c"&gt;# │ │ │ │ │&lt;/span&gt;
&lt;span class="c"&gt;# * * * * *&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;For more about the schema you can check it up over here: &lt;a href="https://crontab.guru/" rel="noopener noreferrer"&gt;https://crontab.guru/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some examples of corn job periods can be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every hour = &lt;code&gt;0 * * * *&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Every minute = &lt;code&gt;* * * * *&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Every day of the month = &lt;code&gt;0 0 1 * *&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Every week  = &lt;code&gt;0 0 * * 1&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Cron kernel is an integrated &lt;a href="https://www.javatpoint.com/linux-tutorial" rel="noopener noreferrer"&gt;Linux&lt;/a&gt; functionality that schedules the execution of programs on your scheme. Cron searches the crontab (Cron tables) for previously established instructions and files. You can set up a Cron job to immediately manage code or other instructions by using a specific format.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Nodejs&lt;/li&gt;
&lt;li&gt;A Vercel account&lt;/li&gt;
&lt;li&gt;Vercel CLI (In this example we are pushing everything directly to vercel)&lt;/li&gt;
&lt;/ul&gt;

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

npm i &lt;span class="nt"&gt;-g&lt;/span&gt; vercel


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

&lt;/div&gt;

&lt;p&gt;I hope you have everything set up!. Let’s code 🙂&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a simple project
&lt;/h2&gt;

&lt;p&gt;To do it run the following commands in the terminal&lt;/p&gt;

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

&lt;span class="nb"&gt;mkdir &lt;/span&gt;cron-job-vercel
&lt;span class="nb"&gt;cd &lt;/span&gt;cron-job-vercel
npm init &lt;span class="nt"&gt;-y&lt;/span&gt;



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

&lt;/div&gt;

&lt;p&gt;Then install the vercel package&lt;/p&gt;

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

npm &lt;span class="nb"&gt;install &lt;/span&gt;vercel &lt;span class="nt"&gt;--save-dev&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Let’s create a folder called API and inside create a file where it will be the cron job&lt;/p&gt;

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

&lt;span class="nb"&gt;mkdir &lt;/span&gt;api
&lt;span class="nb"&gt;touch &lt;/span&gt;api/hello-world.js


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

&lt;/div&gt;

&lt;p&gt;In the hello-world.js paste the following code&lt;/p&gt;

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

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&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;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello world!!&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;span class="p"&gt;};&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Then add the most important thing about this to run as a cron job. &lt;strong&gt;VERCEL.JSON&lt;/strong&gt;&lt;/p&gt;

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

&lt;span class="nb"&gt;touch &lt;/span&gt;vercel.json


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

&lt;/div&gt;
&lt;h2&gt;
  
  
  Cron configuration
&lt;/h2&gt;

&lt;p&gt;Here you need to add the configuration of each cron job (if you have several cron jobs)&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"crons"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
    &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="s2"&gt;"path"&lt;/span&gt;: &lt;span class="s2"&gt;"/api/hello-world"&lt;/span&gt;, // path of the handler
      &lt;span class="s2"&gt;"schedule"&lt;/span&gt;: &lt;span class="s2"&gt;"* * * * *"&lt;/span&gt;  // configuration of the cron job
    &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;&lt;em&gt;IMPORTANT!:&lt;/em&gt; &lt;br&gt;
Take into consideration that if you are using your personal account (Hobby) you can have only 2 cron jobs total, and those can be triggered once per day. So adjust the example to your necessities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy to Vercel
&lt;/h2&gt;

&lt;p&gt;To deploy adjust your package.json. Please add the following script:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&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;"deploy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"vercel --prod"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;


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

&lt;/div&gt;

&lt;p&gt;And in the command line type &lt;code&gt;npm run deploy&lt;/code&gt;. Wait a few minutes and you will have a response similar to this one:&lt;/p&gt;

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

npm run deploy

&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; cron-job-vercel@1.0.0 deploy
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; vercel &lt;span class="nt"&gt;--prod&lt;/span&gt;


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

&lt;/div&gt;

&lt;p&gt;Go to vercel after the cron job starts of you run it manually and you will see something like this&lt;/p&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%2F03btwkjey66hqqaziq0f.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%2F03btwkjey66hqqaziq0f.png" alt="Image CronJob Execution"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Cron jobs are super useful in the development of software. Vercel makes it super easy and handy to use it. &lt;/p&gt;

&lt;p&gt;See you next week. &lt;/p&gt;

&lt;p&gt;Happy Coding&lt;/p&gt;

&lt;p&gt;Ces.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to create a simple API in Vercel</title>
      <dc:creator>Cesar Muñoz</dc:creator>
      <pubDate>Thu, 02 Mar 2023 18:32:06 +0000</pubDate>
      <link>https://dev.to/cemdev/how-to-create-a-simple-api-in-vercel-1a6h</link>
      <guid>https://dev.to/cemdev/how-to-create-a-simple-api-in-vercel-1a6h</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Sometimes creating an API and deploying it to a cloud provider like AWS, GCP, or Azure can be a difficult task. However, Vercel makes it extremely simple to create and deploy your API to the cloud platform. With this tiny tutorial, you can have a simple API in minutes&lt;/p&gt;

&lt;h2&gt;
  
  
  Repository
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/cesmunoz/simple-vercel-api" rel="noopener noreferrer"&gt;https://github.com/cesmunoz/simple-vercel-api&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Nodejs&lt;/li&gt;
&lt;li&gt;A Vercel account&lt;/li&gt;
&lt;li&gt;Vercel CLI (In this example we are pushing everything directly to vercel)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i &lt;span class="nt"&gt;-g&lt;/span&gt; vercel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do you have everything set up? Awesome! Let’s code&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating our API simple project
&lt;/h2&gt;

&lt;p&gt;Let’s create a project, following the next commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;simple-vercel-api
&lt;span class="nb"&gt;cd &lt;/span&gt;simple-vercel-api
npm init &lt;span class="nt"&gt;-y&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;We need to install the vercel package&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;vercel &lt;span class="nt"&gt;--save-dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In order to tell vercel that this is an api we need to create a folder called ***&lt;strong&gt;&lt;em&gt;api,&lt;/em&gt;&lt;/strong&gt;*** that’s it! Really simple, right?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the API lets create a file called hello-world.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;api/hello-world.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the hello-world.js we are going to add a simple code&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="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&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;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello world!!&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;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;aaaand we’re done! Pretty simple don’t you think?&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing locally
&lt;/h2&gt;

&lt;p&gt;In order to test it locally, we need to do the following.&lt;/p&gt;

&lt;p&gt;Go to package.json and add a new item in the scripts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;scripts:&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="err"&gt;start:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"vercel dev"&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;/div&gt;



&lt;p&gt;(Make sure you already configure the vercel cli correctly - &lt;code&gt;vercel login&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;Now we can do &lt;code&gt;npm start&lt;/code&gt; and you need to follow the wizard. Similar to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm start

&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; simple-vercel-api@1.0.0 start
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; vercel dev

Vercel CLI 28.16.12
? Set up and develop “~/repos/simple-vercel-api”? &lt;span class="o"&gt;[&lt;/span&gt;Y/n] y
? Link to existing project? &lt;span class="o"&gt;[&lt;/span&gt;y/N] n
? What’s your project’s name? simple-vercel-api
? In which directory is your code located? ./
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; Ready! Available at http://localhost:3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open a browser a put the following url: &lt;code&gt;http://localhost:3000/api/hello-world.&lt;/code&gt;&lt;br&gt;
The response should be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&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;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Hello world!!"&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;/div&gt;



&lt;h2&gt;
  
  
  Deploy to vercel
&lt;/h2&gt;

&lt;p&gt;To make the api live in production we need to do some adjustments to the project.&lt;/p&gt;

&lt;p&gt;In package.json we will add a new script command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&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;"deploy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"vercel --prod"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And in the command line type &lt;code&gt;npm run deploy&lt;/code&gt;. Wait a few minutes and you will have a response similar to this one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run deploy

&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; simple-vercel-api@1.0.0 deploy
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; vercel &lt;span class="nt"&gt;--prod&lt;/span&gt;

Vercel CLI 28.16.12
🔍  Inspect: https://vercel.com/[your_user]/simple-vercel-api/6PmNoyX4CfhdZhDny8LJmANV7AxB &lt;span class="o"&gt;[&lt;/span&gt;3s]
✅  Production: https://[your_url].vercel.app &lt;span class="o"&gt;[&lt;/span&gt;20s]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go again to the browser and put the Production url that mentions above &lt;code&gt;https://[your_url].vercel.app/api/hello-world&lt;/code&gt; and you should have the same response that you had locally&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&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;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Hello world!!"&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;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Creating a simple API on Vercel is straightforward and super easy. With just a few configurations you can have your own API in the cloud.&lt;/p&gt;

&lt;p&gt;Please let me know if you find it super useful&lt;br&gt;
Cheers!&lt;br&gt;
Ces&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>devops</category>
      <category>discuss</category>
      <category>automation</category>
    </item>
    <item>
      <title>Improve your commits and Pull Request</title>
      <dc:creator>Cesar Muñoz</dc:creator>
      <pubDate>Tue, 08 Feb 2022 20:47:44 +0000</pubDate>
      <link>https://dev.to/cemdev/improve-your-commits-and-pull-request-59a1</link>
      <guid>https://dev.to/cemdev/improve-your-commits-and-pull-request-59a1</guid>
      <description>&lt;p&gt;All the companies try their best to make a unified way to work, from making the website more maintainable to making the response of the api faster.&lt;br&gt;
This time I'm going to be focused on commits, and you are starting asking "Commits?" Yes! commits! :)&lt;/p&gt;

&lt;p&gt;When you are doing your first steps with git you start typing whatever comes to your mind that reflects correctly what you did and if you think about it no one writes, in the same way, a commit. &lt;br&gt;
Also, there are times that you need to deliver something really fast and you don't have time so you type in your commit something like these:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- lint fix
- test
- wip
- fix deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If for some reason the is a bug in the application and you need (for some reason) to read the history con the file or commits, you will see those types of commits. I saw worst comments than above, believe me&lt;/p&gt;

&lt;p&gt;That's when conventional commits comes in the scene.&lt;/p&gt;

&lt;p&gt;So...&lt;strong&gt;&lt;em&gt;What are conventional commits?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Basically is a convention we use on top of a commit message, to make our codebase clearer with some easy steps of rules that we need to follow&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What are the benefits?&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We could have a more clean codebase and readable&lt;/li&gt;
&lt;li&gt;Generate CHANGELOG automatically and sectioned&lt;/li&gt;
&lt;li&gt;Easy to inform to everyone (tech and no tech people)&lt;/li&gt;
&lt;li&gt;Trigger builds&lt;/li&gt;
&lt;li&gt;Contribute easily to everyone&lt;/li&gt;
&lt;li&gt;Know what's going on in the PR&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let me know how to write it!&lt;br&gt;
&lt;strong&gt;Rules&lt;/strong&gt;&lt;br&gt;
The rules are really simple! :).&lt;br&gt;
Need to specify the type of commit/pull request that you did. &lt;/p&gt;

&lt;p&gt;The template will be the following one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;type&amp;gt;[optional scope]: &amp;lt;description&amp;gt;
[optional body]
[optional footer(s)]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's break into parts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;type =&amp;gt; Mandatory&lt;/strong&gt;&lt;br&gt;
This will tell the type of change you are applying to the codebase.&lt;br&gt;
Possibilities:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- fix
- feat =&amp;gt; feature/enhancement
- build
- ci
- chore
- docs
- refactor
- test

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

&lt;/div&gt;



&lt;p&gt;Example: fix: validate user email &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;scope =&amp;gt; Optional&lt;/strong&gt;&lt;br&gt;
With the scope, we are specifying even more where was the change.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fix(api): validate user email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;description =&amp;gt; Mandatory&lt;/strong&gt;&lt;br&gt;
This will remain the same way that we are doing nowadays. Just commit with a message and be as specific as you can&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;body =&amp;gt; Optional&lt;/strong&gt;&lt;br&gt;
If you need to clarify even more you could add a body&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fix(api): validate user email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need to add validation on the email so it can be created properly in our system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;footer(s) =&amp;gt; Optional&lt;/strong&gt;&lt;br&gt;
You could use that for reference whatever you want. For example, in case of a rollback you could do like this.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;revert: let us never again speak of the noodle incident

Refs: 676104e, a215868

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Special Attention =&amp;gt; Important!&lt;/strong&gt;&lt;br&gt;
sometimes we are adding some code that it could lead to breaking the application. &lt;br&gt;
In those mark them in two ways.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding in the &lt;strong&gt;type&lt;/strong&gt; as &lt;strong&gt;BREAKING CHANGE&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Adding an exclamation mark &lt;strong&gt;!&lt;/strong&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my opinion, I prefer the exclamation mark. &lt;br&gt;
Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fix(api)!: validate user email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are some tools to apply this without any mistakes? Sure! there you go.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For VSCode Lovers&lt;/em&gt;&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits"&gt;https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For Vim Lovers&lt;/em&gt;&lt;br&gt;
&lt;a href="https://carlosapgomes.me/post/bettercommitmsgs/"&gt;https://carlosapgomes.me/post/bettercommitmsgs/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For WebStorm Lovers&lt;/em&gt;&lt;br&gt;
&lt;a href="https://plugins.jetbrains.com/plugin/13389-conventional-commit"&gt;https://plugins.jetbrains.com/plugin/13389-conventional-commit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For Pull Requests&lt;/em&gt;&lt;br&gt;
&lt;a href="https://github.com/zeke/semantic-pull-requests"&gt;https://github.com/zeke/semantic-pull-requests&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With this, you and your team can have a unified way to have the commits, and also readable and understandable.&lt;/p&gt;

&lt;p&gt;I hope you try the conventional commits. =)&lt;/p&gt;

&lt;p&gt;If you need to read more about it&lt;br&gt;
&lt;a href="https://www.conventionalcommits.org/en/v1.0.0/"&gt;https://www.conventionalcommits.org/en/v1.0.0/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please feel free to add your experience or thoughts about it.&lt;/p&gt;

&lt;p&gt;See ya next time.&lt;br&gt;
Ces!&lt;/p&gt;

</description>
      <category>git</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>conventionalcommits</category>
    </item>
    <item>
      <title>Make your lambda functions lightweight</title>
      <dc:creator>Cesar Muñoz</dc:creator>
      <pubDate>Tue, 17 Aug 2021 16:51:51 +0000</pubDate>
      <link>https://dev.to/cemdev/make-your-lambda-functions-lightweight-o8h</link>
      <guid>https://dev.to/cemdev/make-your-lambda-functions-lightweight-o8h</guid>
      <description>&lt;p&gt;I see a lot of articles on how to create a lambda with simple steps, always showing the hello world. But every time you start using dependencies in your lambda function, it starts to weigh.&lt;/p&gt;

&lt;p&gt;So, this article will show you how to make your lambda more lightweight and have only the function that we need to execute&lt;/p&gt;

&lt;p&gt;Before jumping into the code you need these requirements:&lt;/p&gt;

&lt;p&gt;1) AWS CLI installed&lt;br&gt;
2) Configure your aws credentials locally with &lt;code&gt;aws configure&lt;/code&gt;. &lt;br&gt;
3) Obviously node installed (We are going to use node v12)&lt;br&gt;
4) Serverless installed &lt;code&gt;npm install -g serverless&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Do you have it all configured? Alright! Let's start coding!! 🙂&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First, I wanna show you the problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a folder or create a repo and clone it. In my case, I created a repo and clone it.&lt;/p&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%2F1yutie17xnduiy1gm8h6.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%2F1yutie17xnduiy1gm8h6.png" alt="CreateRepo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I will use npm to install the dependencies, you could use yarn if you want to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; npm init &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fzdfnw0xhejflaet21kgn.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%2Fzdfnw0xhejflaet21kgn.png" alt="npmInit"&gt;&lt;/a&gt;&lt;br&gt;
This will create a package.json &lt;/p&gt;

&lt;p&gt;Now we are going to create our lambda function with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; sls init aws-node-rest-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fx768pzc6cvkg48ujh8fd.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%2Fx768pzc6cvkg48ujh8fd.png" alt="slsInit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are going to make a few changes to the project. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;aws-node-rest-api&lt;/code&gt; will change it to &lt;code&gt;src&lt;/code&gt; and copy &lt;code&gt;serveless.yml&lt;/code&gt; from &lt;code&gt;src&lt;/code&gt; in our root folder&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;mv &lt;/span&gt;aws-node-rest-api src
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;mv &lt;/span&gt;src/serveless.yml ./serverless.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fmza8zdahaccsjgdsba91.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%2Fmza8zdahaccsjgdsba91.png" alt="Moving Files"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the last thing to change will be the path of where is our lambda function&lt;/p&gt;

&lt;p&gt;Before&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;app: aws-node-rest-api
service: aws-node-rest-api

provider:
  name: aws
  runtime: nodejs12.x

functions:
  hello:
    handler: handler.hello
    events:
      - http:
          path: /
          method: get
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;app: aws-node-rest-api
service: aws-node-rest-api

provider:
  name: aws
  runtime: nodejs12.x

functions:
  hello:
    &lt;span class="k"&gt;**&lt;/span&gt;handler: src/handler.hello&lt;span class="k"&gt;**&lt;/span&gt;
    events:
      - http:
          path: /
          method: get
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I highlighted the changed path of the lambda function. &lt;/p&gt;

&lt;p&gt;And that's it. Let's deploy our function!!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; serverless deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After a while, you'll get the following picture&lt;/p&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%2Fps93r68gh89j2teufpdz.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%2Fps93r68gh89j2teufpdz.png" alt="Deployed"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if you go to aws you can see your new lambda function!! YEY!!! GOOD JOB!!!&lt;/p&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%2F2s4f894t16t0euazo0nl.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%2F2s4f894t16t0euazo0nl.png" alt="AwsFunction"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if go to see what is deployed in our lambda function we can see the code&lt;/p&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%2Fzg9i1ertbs7l8o99o6ke.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%2Fzg9i1ertbs7l8o99o6ke.png" alt="AwsFunctionCode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we are experts in serverless and lambda functions we want to add some packages&lt;/p&gt;

&lt;p&gt;Our lambdas won't we simple right? most of the time we are using packages, to do some calls to the database, call an aws feature, call an api, manipulate an image, etc.&lt;/p&gt;

&lt;p&gt;Now, let's install some packages. Let's say we are going to manipulate some images, in our case we are going to use &lt;code&gt;jimp&lt;/code&gt; (this is only for the example. I needed a heavy npm package)&lt;/p&gt;

&lt;p&gt;So in our console let's type the following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save&lt;/span&gt; jimp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And now let's deploy again a see what's going on&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; severless deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F2isiql83k1sec0bqzbcb.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%2F2isiql83k1sec0bqzbcb.png" alt="AwsFunctionNoCode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wait! What? Cannot see the code? What's going on?&lt;/p&gt;

&lt;p&gt;Well, with the simple configuration we are uploading the node_modules folder into our lambda function and the package that we just installed makes the lambda too large to show the code.&lt;/p&gt;

&lt;p&gt;How can avoid this and see my code again!!?  &lt;strong&gt;Lambda Layers&lt;/strong&gt; to the rescue!!&lt;/p&gt;

&lt;p&gt;That's right! serverless has the ability to create Lambda Layers. A Lambda Layer is a ZIP archive that contains libraries or other dependencies. With that, we can make our lambda function smaller again.&lt;/p&gt;

&lt;p&gt;How we can achieve this? We are going to put our node_modules folder in a Lambda Layer.&lt;/p&gt;

&lt;p&gt;For this, we are going to make a few changes to our code.&lt;/p&gt;

&lt;p&gt;First, we are going to install this package&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; npm i &lt;span class="nt"&gt;--save-dev&lt;/span&gt; serverless-hooks-plugin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and after that, we are creating a deployment folder and create a script where it has all the things that we need to create the layer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;mkdir &lt;/span&gt;deployment
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;touch &lt;/span&gt;deployment/prepare.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our &lt;a href="http://prepare.sh" rel="noopener noreferrer"&gt;prepare.sh&lt;/a&gt; we are going to copy the following code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'****** Starting Pre Deploy Script ******'&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'1- Creating folder for layers and copy package.json'&lt;/span&gt; 
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ./.dist
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; ./.serverless-layers
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; .serverless-layers/node-layers/nodejs
&lt;span class="nb"&gt;cp &lt;/span&gt;package.json .serverless-layers/node-layers/nodejs/
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'DONE!'&lt;/span&gt; 

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'2 - Change path to serverless-layer, adding LIB dependency, remove npm and yarn files'&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; .serverless-layers/node-layers/nodejs
npm i &lt;span class="nt"&gt;--production&lt;/span&gt;
&lt;span class="nb"&gt;rm &lt;/span&gt;package.json
&lt;span class="nb"&gt;rm &lt;/span&gt;package-lock.json
&lt;span class="nb"&gt;cd&lt;/span&gt; ../../..
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'DONE!'&lt;/span&gt; 

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'****** Finished Pre Deploy Script ******'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basically we are creating a nodejs folder inside .serveless-layes/node-layers, copying the package.json from our root folder and install all the dependencies.&lt;/p&gt;

&lt;p&gt;Then, in our package.json we are adding a new script&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="s2"&gt;"deploy:prepare"&lt;/span&gt;: &lt;span class="s2"&gt;"sh deployment/prepare.sh"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Leaving our package.json something like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"name"&lt;/span&gt;: &lt;span class="s2"&gt;"serverless-aws-node-layer-example"&lt;/span&gt;,
  &lt;span class="s2"&gt;"version"&lt;/span&gt;: &lt;span class="s2"&gt;"1.0.0"&lt;/span&gt;,
  &lt;span class="s2"&gt;"description"&lt;/span&gt;: &lt;span class="s2"&gt;""&lt;/span&gt;,
  &lt;span class="s2"&gt;"main"&lt;/span&gt;: &lt;span class="s2"&gt;"index.js"&lt;/span&gt;,
  &lt;span class="s2"&gt;"scripts"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"deploy:prepare"&lt;/span&gt;: &lt;span class="s2"&gt;"sh deployment/prepare.sh"&lt;/span&gt;,
    &lt;span class="s2"&gt;"test"&lt;/span&gt;: &lt;span class="s2"&gt;"echo &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;Error: no test specified&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt; &amp;amp;&amp;amp; exit 1"&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;,
  &lt;span class="s2"&gt;"repository"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"type"&lt;/span&gt;: &lt;span class="s2"&gt;"git"&lt;/span&gt;,
    &lt;span class="s2"&gt;"url"&lt;/span&gt;: &lt;span class="s2"&gt;"git+https://github.com/cesmunoz/serverless-aws-node-layer-example.git"&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;,
  &lt;span class="s2"&gt;"keywords"&lt;/span&gt;: &lt;span class="o"&gt;[]&lt;/span&gt;,
  &lt;span class="s2"&gt;"author"&lt;/span&gt;: &lt;span class="s2"&gt;""&lt;/span&gt;,
  &lt;span class="s2"&gt;"license"&lt;/span&gt;: &lt;span class="s2"&gt;"ISC"&lt;/span&gt;,
  &lt;span class="s2"&gt;"bugs"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"url"&lt;/span&gt;: &lt;span class="s2"&gt;"https://github.com/cesmunoz/serverless-aws-node-layer-example/issues"&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;,
  &lt;span class="s2"&gt;"homepage"&lt;/span&gt;: &lt;span class="s2"&gt;"https://github.com/cesmunoz/serverless-aws-node-layer-example#readme"&lt;/span&gt;,
  &lt;span class="s2"&gt;"dependencies"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"jimp"&lt;/span&gt;: &lt;span class="s2"&gt;"^0.16.1"&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;,
  &lt;span class="s2"&gt;"devDependencies"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"serverless-hooks-plugin"&lt;/span&gt;: &lt;span class="s2"&gt;"^1.1.0"&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the last thing, we need to make this steps in our serveless.yml. &lt;/p&gt;

&lt;p&gt;Adding the following things:&lt;/p&gt;

&lt;p&gt;1) Using the custom hook that the package &lt;code&gt;serverless-hooks-plugin&lt;/code&gt; provides us&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;plugins:
  - serverless-hooks-plugin

custom:
  hooks:
    before:package:createDeploymentArtifacts:
      - npm run deploy:prepare
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) Creating the layer&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;layers:
  nodeModules:
    path: ./.serverless-layers/node-layers
    name: My-App-Node-Dependencies
    description: Node Modules &lt;span class="k"&gt;for &lt;/span&gt;My App
    compatibleRuntimes:
      - nodejs12.x
    package:
      include:
        - ./&lt;span class="k"&gt;**&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) Make our function package individually and exclude everything&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;package:
  individually: &lt;span class="nb"&gt;true
  &lt;/span&gt;exclude:
    - ./&lt;span class="k"&gt;**&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4) Include only our handler.js in the lambda function and make use of the lambda layer&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;functions:
  hello:
    handler: src/handler.hello
    layers:
      - &lt;span class="o"&gt;{&lt;/span&gt; Ref: NodeModulesLambdaLayer &lt;span class="o"&gt;}&lt;/span&gt;
    package:
      include:
        - src/handler.js        
    events:
      - http:
          path: /
          method: get
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The final serveless.yml will be something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;app: aws-node-rest-api
service: aws-node-rest-api

provider:
  name: aws
  runtime: nodejs12.x

plugins:
  - serverless-hooks-plugin

custom:
  hooks:
    before:package:createDeploymentArtifacts:
      - npm run deploy:prepare

layers:
  nodeModules:
    path: ./.serverless-layers/node-layers
    name: My-App-Node-Dependencies
    description: Node Modules &lt;span class="k"&gt;for &lt;/span&gt;My App
    compatibleRuntimes:
      - nodejs12.x
    package:
      include:
        - ./&lt;span class="k"&gt;**&lt;/span&gt;

package:
  individually: &lt;span class="nb"&gt;true
  &lt;/span&gt;exclude:
    - ./&lt;span class="k"&gt;**&lt;/span&gt;

functions:
  hello:
    handler: src/handler.hello
    layers:
      - &lt;span class="o"&gt;{&lt;/span&gt; Ref: NodeModulesLambdaLayer &lt;span class="o"&gt;}&lt;/span&gt;
    package:
      include:
        - src/handler.js        
    events:
      - http:
          path: /
          method: get
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's deploy it again and see what happens&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; serverless deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F110d6vpngzkyzxcuwx31.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%2F110d6vpngzkyzxcuwx31.png" alt="AwsFunctionCodeAgain"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Woala! We can see our code again! &lt;/p&gt;

&lt;p&gt;And Where is our lambda layer? &lt;/p&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%2Fsre3hw12wcynwn0dbtem.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%2Fsre3hw12wcynwn0dbtem.png" alt="AwsLambdaLayer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see and the lambda function has a dependency on our new lambda layer&lt;/p&gt;

&lt;p&gt;And if we go to lambda layers we can see it's there&lt;/p&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%2Fix9g1an54u6ol1o3ruth.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%2Fix9g1an54u6ol1o3ruth.png" alt="AwsLayers"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So with that configuration we can view always our code.&lt;/p&gt;

&lt;p&gt;Hope you found it useful as I do.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/cesmunoz/serverless-aws-node-layer-example" rel="noopener noreferrer"&gt;https://github.com/cesmunoz/serverless-aws-node-layer-example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See you next time!!&lt;/p&gt;

&lt;p&gt;C.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>serverless</category>
      <category>aws</category>
    </item>
    <item>
      <title>My VSCode Extensions</title>
      <dc:creator>Cesar Muñoz</dc:creator>
      <pubDate>Wed, 02 Jun 2021 17:12:55 +0000</pubDate>
      <link>https://dev.to/cemdev/my-vscode-extensions-30d7</link>
      <guid>https://dev.to/cemdev/my-vscode-extensions-30d7</guid>
      <description>&lt;p&gt;VSCode is a great IDE to work with and very popular for couple of years.&lt;br&gt;
Since I decided to start coding with node &amp;amp; react, I choose VSCode as my main IDE (I was a C# developer before, so I keep in team Microsoft)&lt;br&gt;
From time to time I added, deleted or switch extension of VSCode&lt;/p&gt;

&lt;p&gt;My currently extensions are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag" rel="noopener noreferrer"&gt;Auto Rename Tag&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of replace each tag, it renames paired tags. This extension is a MUST!&lt;/p&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%2Fgithub.com%2Fformulahendry%2Fvscode-auto-rename-tag%2Fraw%2Fmaster%2Fimages%2Fusage.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%2Fgithub.com%2Fformulahendry%2Fvscode-auto-rename-tag%2Fraw%2Fmaster%2Fimages%2Fusage.gif" alt="image"&gt;&lt;/a&gt;   &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel" rel="noopener noreferrer"&gt;Babel Javascript&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This basically highlights the syntax of ES6/7/8/etc, ReactJsx&lt;/p&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%2Fy72q6oyzz5mj4n6cs47r.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%2Fy72q6oyzz5mj4n6cs47r.png" alt="image"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments" rel="noopener noreferrer"&gt;Better Comments&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I avoid to use comments, really. But sometimes someone add some comments and it's a good thing to highlight to see and make decisions like (refactoring, tech debt, etc).&lt;/p&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%2Fn5is7qwpgsv6fhnu7kgf.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%2Fn5is7qwpgsv6fhnu7kgf.png" alt="image"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks" rel="noopener noreferrer"&gt;Bookmarks&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Visual Studio (in my C# days) I used a lot of bookmarks, so it's great to have this extension. Great way to navigate through your code.  &lt;/p&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%2Fxrnrga1bcc6id0f3ko2r.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%2Fxrnrga1bcc6id0f3ko2r.png" alt="image"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer" rel="noopener noreferrer"&gt;Bracket Pair Colorizer&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This matches the brackets with colors. It's awesome!&lt;/p&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%2Fscdb4uvtus32jrwd20af.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%2Fscdb4uvtus32jrwd20af.png" alt="image"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker" rel="noopener noreferrer"&gt;Code Spell Checker&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My native language is Spanish and sometimes I make mistakes writing some variable in English, so this extension tells you if the word you typed is correct or not.&lt;/p&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%2Fraw.githubusercontent.com%2Fstreetsidesoftware%2Fvscode-spell-checker%2Fmaster%2Fpackages%2Fclient%2Fimages%2Fexample.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%2Fraw.githubusercontent.com%2Fstreetsidesoftware%2Fvscode-spell-checker%2Fmaster%2Fpackages%2Fclient%2Fimages%2Fexample.gif" alt="image"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker" rel="noopener noreferrer"&gt;Docker&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I use docker a lot, and sometimes I'm lazy to start a container in the command line, so this is great tool to start, stop, delete a container.&lt;/p&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%2Fgithub.com%2Fmicrosoft%2Fvscode-docker%2Fraw%2FHEAD%2Fresources%2Freadme%2Fdocker-view-context-menu.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%2Fgithub.com%2Fmicrosoft%2Fvscode-docker%2Fraw%2FHEAD%2Fresources%2Freadme%2Fdocker-view-context-menu.gif" alt="image"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=mikestead.dotenv" rel="noopener noreferrer"&gt;DotENV&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basically is a port of DOTENV for vscode&lt;/p&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%2Fanvfcat52dct0gidwliy.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%2Fanvfcat52dct0gidwliy.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=dracula-theme.theme-dracula" rel="noopener noreferrer"&gt;Dracula Official&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is my currently theme. I use night owl and others but right now this is the theme for me. Maybe in the future I will change it again.&lt;/p&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%2Fpdaiu4at4og4s5ph6tiy.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%2Fpdaiu4at4og4s5ph6tiy.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint" rel="noopener noreferrer"&gt;ESLint&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This extension integrates ESLint into VSCode and will let you know for eslint errors that need to be fix.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens" rel="noopener noreferrer"&gt;GitLens&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is awesome to compare, see while you are coding, who was the last person to made the modification.&lt;/p&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%2Fraw.githubusercontent.com%2Feamodio%2Fvscode-gitlens%2Fmain%2Fimages%2Fdocs%2Frevision-navigation.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%2Fraw.githubusercontent.com%2Feamodio%2Fvscode-gitlens%2Fmain%2Fimages%2Fdocs%2Frevision-navigation.gif" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer" rel="noopener noreferrer"&gt;Live Server&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This launch a local development server with live reload&lt;/p&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%2Fgithub.com%2Fritwickdey%2Fvscode-live-server%2Fraw%2Fmaster%2Fimages%2FScreenshot%2Fvscode-live-server-animated-demo.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%2Fgithub.com%2Fritwickdey%2Fvscode-live-server%2Fraw%2Fmaster%2Fimages%2FScreenshot%2Fvscode-live-server-animated-demo.gif" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://visualstudio.microsoft.com/es/services/live-share/" rel="noopener noreferrer"&gt;Live Share&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a great tool for collaboration. You can work with a partner in realtime, can debug, make call, share terminals. It's an awesome tool!&lt;/p&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%2Fvisualstudio.microsoft.com%2Fwp-content%2Fuploads%2F2018%2F11%2Fv2-Edit-Comp_FINAL-optimized840.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%2Fvisualstudio.microsoft.com%2Fwp-content%2Fuploads%2F2018%2F11%2Fv2-Edit-Comp_FINAL-optimized840.gif" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one" rel="noopener noreferrer"&gt;Markdown All In One&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This basically makes you markdown more pretty&lt;/p&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%2Ffxr7w9hbwp55p9crm7hc.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%2Ffxr7w9hbwp55p9crm7hc.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ionutvmi.path-autocomplete" rel="noopener noreferrer"&gt;Path Autocomplete&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Provides a path autocomplete for vscode&lt;/p&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%2Fraw.githubusercontent.com%2Fionutvmi%2Fpath-autocomplete%2Fmaster%2Fdemo%2Fpath-autocomplete.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%2Fraw.githubusercontent.com%2Fionutvmi%2Fpath-autocomplete%2Fmaster%2Fdemo%2Fpath-autocomplete.gif" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense" rel="noopener noreferrer"&gt;Path Intellisense&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Plugin that autocompletes filenames&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/iaHeUiDeTUZuo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/iaHeUiDeTUZuo.gif" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock" rel="noopener noreferrer"&gt;Peacock&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is an awesome tool to distinguish all your vscode windows.&lt;br&gt;
You can set a color in your vscode workspace. I use to check my work and my personal projects&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=pnp.polacode" rel="noopener noreferrer"&gt;Polacode&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It create a nice code snippet to upload in your blog&lt;/p&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%2Fgithub.com%2Foctref%2Fpolacode%2Fraw%2Fmaster%2Fdemo%2Fusage.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%2Fgithub.com%2Foctref%2Fpolacode%2Fraw%2Fmaster%2Fdemo%2Fusage.gif" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode" rel="noopener noreferrer"&gt;Prettier - Code Formatter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Great Tool for formatting. I super recommend it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=aaronpowell.vscode-profile-switcher" rel="noopener noreferrer"&gt;Profile Switcher&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have lots of different configurations, work, personal, talk presentation. &lt;br&gt;
With this extension I can change really quick instead of making modification in my json configuration file.&lt;/p&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%2Fgithub.com%2Faaronpowell%2Fvscode-profile-switcher%2Fraw%2Fmaster%2Fimages%2Freadme-demo.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%2Fgithub.com%2Faaronpowell%2Fvscode-profile-switcher%2Fraw%2Fmaster%2Fimages%2Freadme-demo.gif" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=WallabyJs.quokka-vscode" rel="noopener noreferrer"&gt;Quokka.js&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Great tool to test something really quick.&lt;/p&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%2Fcfvezh1lkp173ylmy7ss.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%2Fuploads%2Farticles%2Fcfvezh1lkp173ylmy7ss.gif" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync" rel="noopener noreferrer"&gt;Settings Sync&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of adding all the extensions each time I install vscode, I use this extension that keeps everything in sync. (extensions, settings, etc). &lt;/p&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%2Fpc7jt6hvcaqms036ysmp.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%2Fpc7jt6hvcaqms036ysmp.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=wayou.vscode-todo-highlight" rel="noopener noreferrer"&gt;TODO Highlight&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not much to say here, if you see a todo it will highlight.&lt;/p&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%2F5yyxblta7p57lj0c2l4l.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%2F5yyxblta7p57lj0c2l4l.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons" rel="noopener noreferrer"&gt;vscode-icons&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Like my current theme is Dracula, this my current icons theme. Maybe in the future I will change it&lt;/p&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%2Feqs8zfxkrg5prbzdl6ub.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%2Feqs8zfxkrg5prbzdl6ub.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have a good extension, please comment below. &lt;br&gt;
I promise the next article will be more interesting.&lt;/p&gt;

&lt;p&gt;The next article will be using lambda layers to make your lambda functions more lightweight&lt;/p&gt;

&lt;p&gt;See you next time&lt;br&gt;
C.&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>extensions</category>
      <category>javascript</category>
      <category>ide</category>
    </item>
    <item>
      <title>First Post - A new journey begins</title>
      <dc:creator>Cesar Muñoz</dc:creator>
      <pubDate>Thu, 24 Sep 2020 23:35:00 +0000</pubDate>
      <link>https://dev.to/cemdev/first-post-a-new-journey-begins-15e</link>
      <guid>https://dev.to/cemdev/first-post-a-new-journey-begins-15e</guid>
      <description>&lt;p&gt;So many times I decided to start making some blog posts but I always heard a little voice that says the following statement: "What are you going to write in your blog? There is a huge amount of posts writing about the same thing."&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Today, don't know why, but I'll start my blog 💪 🙂&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Let me introduce myself&lt;br&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Hi! I'm Cesar 👋
&lt;/h3&gt;

&lt;p&gt;I'm a software developer. I was born in 1987 and grew up in Quilmes (Argentina). I started coding when I was 15 in high-school.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;I've written code for Hewlett-Packard, Accenture, Lagash, N5, Virtualmind, Morean to name a few (Some are bigger than others)&lt;br&gt;&lt;/p&gt;

&lt;p&gt;In all these companies I've learned a lot and I am very grateful for all the experience that I've achieved through the years.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;For two years I was an educator for Acamica, it was a really amazing experience.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;The languages I used were: Pascal, C, Visual Basic, Visual Basic .NET, C#, Javascript&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Nowadays my mainly stack are these:&lt;br&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Languages: Javascript, Typescript&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tech: NodeJS, React, Redux, AWS (Amazon Web Services), Serverless, ElasticSearch, Git, Mocha, Chai, Jest, Express.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Cloud (AWS): IAM, CloudFormation, DynamoDB, EC2, IoT, Kinesis, SQS, Lambda, RDS, S3 &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my free time, I love listening to music, play video games (I'm an Xbox fan), stream on twitch.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;I used to play baseball and used to have a band (I'll make a post about them in the near future)&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;So, that's about it.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Please follow me or contact me!!&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Twitter - &lt;a href="https://twitter.com/cesmunoz35"&gt;https://twitter.com/cesmunoz35&lt;/a&gt;&lt;br&gt;
LinkedIn - &lt;a href="https://www.linkedin.com/in/cesar-mu%C3%B1oz-61675949/"&gt;https://www.linkedin.com/in/cesar-muñoz-61675949/&lt;/a&gt;&lt;br&gt;
Github - &lt;a href="https://github.com/cesmunoz"&gt;https://github.com/cesmunoz&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;P.S: It's my first time writing a post in English. I hope it can be understood well. Also making post are a way to improve myself 🙂. Sorry for all the grammar issues&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
