<?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: Craig Shoemaker</title>
    <description>The latest articles on DEV Community by Craig Shoemaker (@craigshoemaker).</description>
    <link>https://dev.to/craigshoemaker</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%2F230764%2Fa27f48eb-5b12-412b-acc3-1675e81774ea.png</url>
      <title>DEV Community: Craig Shoemaker</title>
      <link>https://dev.to/craigshoemaker</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/craigshoemaker"/>
    <language>en</language>
    <item>
      <title>My git aliases</title>
      <dc:creator>Craig Shoemaker</dc:creator>
      <pubDate>Mon, 18 Jul 2022 13:09:57 +0000</pubDate>
      <link>https://dev.to/craigshoemaker/my-git-aliases-2dnk</link>
      <guid>https://dev.to/craigshoemaker/my-git-aliases-2dnk</guid>
      <description>&lt;p&gt;I'm lazy.&lt;/p&gt;

&lt;p&gt;Every day I need to sync up branches in git to account for the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Changes made to the remote &lt;code&gt;main&lt;/code&gt; branch&lt;/li&gt;
&lt;li&gt;Changes made to the current branch from the origin&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In looking for ways to make to some simple shortcuts, I found Nicolas Fränkel's blog post on &lt;a href="https://blog.frankel.ch/creating-git-shortcuts/"&gt;Creating Git shortcuts&lt;/a&gt; and &lt;a href="https://stackoverflow.com/questions/2111042/how-to-get-the-name-of-the-current-git-branch-into-a-variable-in-a-shell-script"&gt;How to get the name of the current git branch into a variable in a shell script?&lt;/a&gt; to be particularly helpful.&lt;/p&gt;

&lt;p&gt;By using the techniques described in each of these articles in concert, I have defind the following git aliases.&lt;/p&gt;

&lt;h2&gt;
  
  
  open
&lt;/h2&gt;

&lt;p&gt;Opens the current folder in Visual Studio Code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias open="code ."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  get-branch
&lt;/h2&gt;

&lt;p&gt;Sets &lt;code&gt;$branch&lt;/code&gt; as the current branch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias get-branch="branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  sync-branch
&lt;/h2&gt;

&lt;p&gt;Pulls the branch set to &lt;code&gt;$branch&lt;/code&gt; from the origin.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias sync-branch="git pull origin $branch"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  sync-main
&lt;/h2&gt;

&lt;p&gt;Pulls the remote &lt;code&gt;main&lt;/code&gt; branch into the current branch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias sync-main="git pull upstream main"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Refactor Node.js and Express APIs to Serverless - Free Workshop</title>
      <dc:creator>Craig Shoemaker</dc:creator>
      <pubDate>Thu, 10 Sep 2020 18:05:05 +0000</pubDate>
      <link>https://dev.to/azure/refactor-node-js-and-express-apis-to-serverless-free-workshop-p8f</link>
      <guid>https://dev.to/azure/refactor-node-js-and-express-apis-to-serverless-free-workshop-p8f</guid>
      <description>&lt;p&gt;Join us as we refactor an Express API to serverless architecture in this free hands-on workshop.&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="err"&gt;topic:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Refactor Node.js and Express APIs to Serverless"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;date:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Sep 16, 2020"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;time:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"8am PT/11am ET"&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; &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://aka.ms/learnshop-sep16"&gt;Watch broadcast here&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Add calendar reminder&lt;/strong&gt;: &lt;a href="https://publicevents.blob.core.windows.net/files/LearnShop%20-%20Refactor%20Node.js%20and%20Express%20APIs%20to%20Serverless-Outlook.ics?sv=2019-02-02&amp;amp;st=2020-09-10T16%3A44%3A04Z&amp;amp;se=2020-09-17T16%3A44%3A00Z&amp;amp;sr=b&amp;amp;sp=r&amp;amp;sig=luZKjICZlZJeGoQCabox7eHLuo%2B%2F%2FBoKYzFKzx0Z4Xk%3D"&gt;Outlook&lt;/a&gt;, &lt;a href="https://publicevents.blob.core.windows.net/files/LearnShop%20-%20Refactor%20Node.js%20and%20Express%20API%27s%20to%20Serverless-iCal.ics?sv=2019-02-02&amp;amp;st=2020-09-10T16%3A23%3A13Z&amp;amp;se=2020-09-17T16%3A23%3A00Z&amp;amp;sr=b&amp;amp;sp=r&amp;amp;sig=SExsryNd2h%2FVw5JBPTe2SSyjLw0DPCV5Z41DgUpvfwQ%3D"&gt;iCal&lt;/a&gt;, &lt;a href="https://calendar.google.com/event?action=TEMPLATE&amp;amp;tmeid=NXZnYmFqYzF1N2w2ZzhqdWRzMTA0bXByaXEgMjg1aHBjZGZxMHZzaG80b3MxMjdiMm5vczhAZw&amp;amp;tmsrc=285hpcdfq0vsho4os127b2nos8%40group.calendar.google.com"&gt;Google Calendar&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;You'll learn to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Refactor Node.js Express APIs to an Azure Functions application&lt;/li&gt;
&lt;li&gt;Create a Functions app with TypeScript/JavaScript&lt;/li&gt;
&lt;li&gt;Explore the differences and similarities between Express APIs and Azure Functions&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;a href="https://aka.ms/learnshop-sep16"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IgaTrc_X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nqxywmgc2agakt1j2gbf.png" alt="Refactor Node.js and Express APIs to Serverless - Free Workshop" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Join &lt;a href="https://twitter.com/burkeholland"&gt;Burke Holland&lt;/a&gt;, &lt;a href="http://twitter.com/john_papa"&gt;John Papa&lt;/a&gt;, and &lt;a href="https://twitter.com/craigshoemaker"&gt;Craig Shoemaker&lt;/a&gt; for this FREE event by &lt;a href="https://aka.ms/learnshop-sep16"&gt;watching the stream&lt;/a&gt; (during broadcast hours), or set reminder on your calendar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://publicevents.blob.core.windows.net/files/LearnShop%20-%20Refactor%20Node.js%20and%20Express%20APIs%20to%20Serverless-Outlook.ics?sv=2019-02-02&amp;amp;st=2020-09-10T16%3A44%3A04Z&amp;amp;se=2020-09-17T16%3A44%3A00Z&amp;amp;sr=b&amp;amp;sp=r&amp;amp;sig=luZKjICZlZJeGoQCabox7eHLuo%2B%2F%2FBoKYzFKzx0Z4Xk%3D"&gt;Outlook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://publicevents.blob.core.windows.net/files/LearnShop%20-%20Refactor%20Node.js%20and%20Express%20API%27s%20to%20Serverless-iCal.ics?sv=2019-02-02&amp;amp;st=2020-09-10T16%3A23%3A13Z&amp;amp;se=2020-09-17T16%3A23%3A00Z&amp;amp;sr=b&amp;amp;sp=r&amp;amp;sig=SExsryNd2h%2FVw5JBPTe2SSyjLw0DPCV5Z41DgUpvfwQ%3D"&gt;iCal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://calendar.google.com/event?action=TEMPLATE&amp;amp;tmeid=NXZnYmFqYzF1N2w2ZzhqdWRzMTA0bXByaXEgMjg1aHBjZGZxMHZzaG80b3MxMjdiMm5vczhAZw&amp;amp;tmsrc=285hpcdfq0vsho4os127b2nos8%40group.calendar.google.com"&gt;Google Calendar&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bring you questions as we'll answering in real-time through YouTube chat.&lt;/p&gt;

&lt;p&gt;If you want a head start, you make sure to check out these resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://johnpapa.net/refactor-your-node-js-and-express-apis-to-serverless-apis-with-azure-functions/"&gt;Refactor Your Node.js and Express APIs to Serverless APIs with Azure Functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aka.ms/ls-express-serverless"&gt;Refactor Node.js and Express APIs to Serverless APIs with Azure Functions: Interactive Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/azure-functions/shift-expressjs?wt.mc_id=express_serverless_learnshop-event-cxa"&gt;Shifting from Express.js to Azure Functions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We'll see you there!&lt;/p&gt;

</description>
      <category>serverless</category>
      <category>node</category>
      <category>javascript</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Create:Frontend: 5 Ways to Learn from This Event!</title>
      <dc:creator>Craig Shoemaker</dc:creator>
      <pubDate>Tue, 28 Jul 2020 23:48:55 +0000</pubDate>
      <link>https://dev.to/azure/create-frontend-5-ways-to-learn-from-this-event-2fn5</link>
      <guid>https://dev.to/azure/create-frontend-5-ways-to-learn-from-this-event-2fn5</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Want to do more with static web apps?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Join us at &lt;a href="https://aka.ms/createfrontend" rel="noopener noreferrer"&gt;CREATE:Frontend&lt;/a&gt; on Jul 29 (8:30am PDT / 11:30am EDT) for a 4-hr free virtual event with 8 talks and a &lt;a href="https://dev.to/azure/free-workshop-on-azure-static-web-apps-1341"&gt;90-minute hands-on workshop&lt;/a&gt; to jumpstart your static web apps journey&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Bookmark &lt;a href="https://dev.to/azure/let-s-talk-about-everything-frontend-2o9e"&gt;our anchor post&lt;/a&gt; and do check back for updates&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;On July 29 we are running &lt;a href="https://aka.ms/createfrontend" rel="noopener noreferrer"&gt;Create: Frontend&lt;/a&gt;, a virtual half-day event focused on learning and exploration for front-end developers. &lt;/p&gt;

&lt;p&gt;The event is free and live-streamed, and features speakers and topics ranging from static websites and accessibility, to remoe work, inclusive design and visual storytelling. Here are 5 things you can do to get the most from the event.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Watch Sessions, Engage With Speakers!
&lt;/h2&gt;

&lt;p&gt;You can find all the sessions here, on our anchor post. &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/azure" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__org__pic"&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%2Forganization%2Fprofile_image%2F512%2F64ce0b82-730d-4ca0-8359-2c21513a0063.jpg" alt="Microsoft Azure"&gt;
      &lt;div class="ltag__link__user__pic"&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%2Fuser%2Fprofile_image%2F352693%2Fb8911898-d91f-43c8-8dc5-f6f6e5a41820.JPG" alt=""&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/azure/let-s-talk-about-everything-frontend-2o9e" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Create:Frontend - Let's talk about static web apps!&lt;/h2&gt;
      &lt;h3&gt;theCatShepherd for Microsoft Azure ・ Jul 22 '20&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#mscreate&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#frontend&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;We recommend you bookmark that page and revisit it later to get updates when on videos, resources and more.&lt;/p&gt;

&lt;p&gt;Most talks are just 15 minutes long, but each has a dev.to page where we encourage you to post comments or ask questions. &lt;br&gt;
Speakers will spend 15 minutes after their session on Q&amp;amp;A and take questions via these comments. Once the live Q&amp;amp;A is over, we will post an update on that page. Subsquent questions may be answered at the discretion (and availability) of speakers.&lt;/p&gt;


&lt;h2&gt;
  
  
  2. Attend the Hands-on Workshop!
&lt;/h2&gt;

&lt;p&gt;Nothing helps you learn and use new ideas like a hands-on workshop. We've got a 90-minute session for you to dig in deep into building and deploying web apps with your favorite JavaScript framework. Learn more here and don't miss it!&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/azure" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__org__pic"&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%2Forganization%2Fprofile_image%2F512%2F64ce0b82-730d-4ca0-8359-2c21513a0063.jpg" alt="Microsoft Azure"&gt;
      &lt;div class="ltag__link__user__pic"&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%2Fuser%2Fprofile_image%2F138665%2Fcee5c68d-3bd2-4042-af64-5214952d6c30.jpg" alt=""&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/azure/free-workshop-on-azure-static-web-apps-1341" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Free Workshop on Azure Static Web Apps&lt;/h2&gt;
      &lt;h3&gt;John Papa for Microsoft Azure ・ Jul 22 '20&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#angular&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#vue&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#staticwebapps&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;





&lt;h2&gt;
  
  
  3. Follow the &lt;a href="https://dev.to/azure"&gt;Azure Organization&lt;/a&gt; on dev.to!
&lt;/h2&gt;

&lt;p&gt;Most of the speakers and moderators are members of the &lt;a href="https://dev.to/azure"&gt;Azure Organization&lt;/a&gt; on dev.to. These include members from the Developer Relations teams and Product Groups.&lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__512"&gt;
  &lt;a href="/azure" class="ltag__user__link profile-image-link"&gt;
    &lt;div class="ltag__user__pic"&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%2Forganization%2Fprofile_image%2F512%2F64ce0b82-730d-4ca0-8359-2c21513a0063.jpg" alt="azure image"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
      &lt;a href="/azure" class="ltag__user__link"&gt;Microsoft Azure&lt;/a&gt;
      Follow
    &lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a href="/azure" class="ltag__user__link"&gt;
        Learn how to build and manage powerful applications using Microsoft Azure cloud services. Explore the documentation and samples, skill yourself up with tutorials and training. Any language. Any platform. 
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;By following the organization, you can be notified of the latest content posted by the team, and get early notice about other such virtual events that we will run in the future.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Explore the Resources!
&lt;/h2&gt;

&lt;p&gt;Want to continue your static web apps journey? We have you covered! Here are three places to start:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aka.ms/swadocs" rel="noopener noreferrer"&gt;Check out the docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aka.ms/swalearn" rel="noopener noreferrer"&gt;Try out a learning path&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aka.ms/mscreate-ch9" rel="noopener noreferrer"&gt;Watch talks on Channel 9&lt;/a&gt;&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%2F5h2p7pse56nun5pygx83.jpg" 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%2F5h2p7pse56nun5pygx83.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Watch the keynote!!
&lt;/h2&gt;

&lt;p&gt;Yes, join &lt;a href="https://twitter.com/DariaGrigoriu?s=20" rel="noopener noreferrer"&gt;Daria Grigoriu&lt;/a&gt;, and me, &lt;a href="https://twitter.com/craigshoemaker?s=20" rel="noopener noreferrer"&gt;Craig Shoemaker&lt;/a&gt;, for the opening keynote as we kick off this event. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;SESSION: July 29, 2020: 08:35 PDT - 08:50AM PDT&lt;/code&gt;&lt;br&gt;
We share what's on the top of mind for frontend developers and the state of developers tools in 2020.&lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__230764"&gt;
    &lt;a href="/craigshoemaker" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&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%2Fuser%2Fprofile_image%2F230764%2Fa27f48eb-5b12-412b-acc3-1675e81774ea.png" alt="craigshoemaker image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/craigshoemaker"&gt;Craig Shoemaker&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/craigshoemaker"&gt;I work for Microsoft on the Azure Static Web Apps &amp;amp; Azure Container Apps teams | Pluralsight author | Web Rush co-host | Musician https://bit.ly/the-ride-yt&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;And don't forget! Even though &lt;strong&gt;CREATE: Frontend&lt;/strong&gt; is 100% virtual, we've made sure we still make personal connections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Live Q&amp;amp;A&lt;/strong&gt;: Engage in discussions with speakers and the community. Speakers will be online for about 15 minutes after their session. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;: After the event, check for additional slides, videos, and resources for this session including &lt;a href="https://dev.to/azure/keeping-your-child-engaged-while-you-are-at-a-virtual-event-4l53"&gt;activity packs for kids&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;See you online!&lt;/p&gt;

</description>
      <category>azure</category>
      <category>webdev</category>
      <category>serverless</category>
      <category>mscreate</category>
    </item>
    <item>
      <title>Runtime binding with Azure Functions</title>
      <dc:creator>Craig Shoemaker</dc:creator>
      <pubDate>Mon, 23 Sep 2019 23:32:33 +0000</pubDate>
      <link>https://dev.to/azure/runtime-binding-with-azure-functions-3gno</link>
      <guid>https://dev.to/azure/runtime-binding-with-azure-functions-3gno</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This article is part of &lt;a href="https://dev.to/azure/serverless-september-content-collection-2fhb"&gt;#ServerlessSeptember&lt;/a&gt;. You'll find other helpful articles, detailed tutorials, and videos in this all-things-Serverless content collection. New articles are published every day — that's right, every day — from community members and cloud advocates in the month of September. &lt;/p&gt;

&lt;p&gt;Find out more about how Microsoft Azure enables your Serverless functions at &lt;a href="https://docs.microsoft.com/azure/azure-functions/?WT.mc_id=servsept_devto-blog-cxa"&gt;https://docs.microsoft.com/azure/azure-functions/&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Serverless functions rarely work in isolation. Functions are often paired with other services like a database, a storage service, or perhaps even an email notification service. &lt;a href="https://azure.microsoft.com/services/functions/"&gt;Azure Functions&lt;/a&gt; makes it easy to connect with these services by offering &lt;a href="https://docs.microsoft.com/azure/azure-functions/functions-triggers-bindings"&gt;bindings&lt;/a&gt; that give you an out-of-the-box connection to an &lt;a href="https://docs.microsoft.com/azure/azure-functions/functions-triggers-bindings#supported-bindings"&gt;array of cloud services&lt;/a&gt;. You can achieve a lot using the standard configurations, but what if you need go beyond the defaults?&lt;/p&gt;

&lt;p&gt;Suppose you want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Change a storage location depending on an incoming IP address?&lt;/li&gt;
&lt;li&gt;Switch an email recipient based on a dev vs. production environment?&lt;/li&gt;
&lt;li&gt;Write data to a different message queue based on a date range?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are just a few examples of the type of adjustments which may be difficult using a binding's default settings. This article demonstrates how to configure a C# Azure Functions binding at run time to take full control over a binding's configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  tl;dr
&lt;/h2&gt;

&lt;p&gt;To configure a binding at runtime:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Declare the binding parameter as a &lt;a href="https://docs.microsoft.com/azure/azure-functions/functions-dotnet-class-library#binding-at-runtime"&gt;Binder or IBinder&lt;/a&gt; instance.&lt;/li&gt;
&lt;li&gt;Create an instance of the binding attribute.&lt;/li&gt;
&lt;li&gt;Customize the binding attribute as necessary.&lt;/li&gt;
&lt;li&gt;Either use &lt;code&gt;Bind&lt;/code&gt; or &lt;code&gt;BindAsync&lt;/code&gt; to bind the attribute to a cloud service.&lt;/li&gt;
&lt;li&gt;Use the binding&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A working example is available on GitHub: &lt;a href="https://github.com/craigshoemaker/azure-functions-runtime-binding"&gt;azure-functions-runtime-binding&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Default binding
&lt;/h2&gt;

&lt;p&gt;Before diving into the details of how runtime binding works, first consider the default scenario. The following code example implements an HTTP-triggered function that saves a message to an &lt;a href="https://docs.microsoft.com/azure/azure-functions/functions-bindings-storage-blob"&gt;Azure Storage&lt;/a&gt; blob container.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;FunctionName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"SaveDefault"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="n"&gt;IActionResult&lt;/span&gt; &lt;span class="nf"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;HttpTrigger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AuthorizationLevel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Function&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"get"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Route&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
    &lt;span class="n"&gt;HttpRequest&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;Blob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"messages/{sys.randguid}.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileAccess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt; &lt;span class="k"&gt;out&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ILogger&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Query&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="n"&gt;blob&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;$"Default binding: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s"&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="nf"&gt;OkResult&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;For the binding to work in this context, the &lt;code&gt;blob&lt;/code&gt; parameter is set up in the following ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;Blob&lt;/code&gt; attribute is declared to write data mapped to a blob container named &lt;code&gt;messages&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;{sys.randguid}&lt;/code&gt; replacement token ensures the new blob is given a unique name.&lt;/li&gt;
&lt;li&gt;The parameter is declared as a &lt;code&gt;string&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The parameter is declared as an &lt;code&gt;out&lt;/code&gt; parameter. Using an out parameter gives the binding a chance to take the primitive &lt;code&gt;string&lt;/code&gt;'s value and use it to write out to the storage container elsewhere in the binding's logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This setup works great for simple scenarios. However, using this approach makes it difficult to make changes to the binding. In some cases you may want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Change the connection string.&lt;/li&gt;
&lt;li&gt;Calculate the blob name and/or the container's name.

&lt;ul&gt;
&lt;li&gt;You do have a few replacement tokens and route parameters available to influence the blob path, but some needs are more complex.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Dynamically change the file access type. Perhaps in some instances you want to create the attribute with &lt;code&gt;Write&lt;/code&gt; or &lt;code&gt;ReadWrite&lt;/code&gt; access levels.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To achieve more flexible binding customization, you can implement runtime binding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Runtime binding
&lt;/h2&gt;

&lt;p&gt;The final result of the following function is the same as implemented for the default scenario. The difference in this instance is that the binding is imperatively created, giving you the chance to affect a binding's behavior.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;FunctionName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"SaveCustom"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IActionResult&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;HttpTrigger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AuthorizationLevel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Function&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"get"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Route&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
    &lt;span class="n"&gt;HttpRequest&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;IBinder&lt;/span&gt; &lt;span class="n"&gt;binder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ILogger&lt;/span&gt; &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Query&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

    &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;attribute&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;BlobAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"messages/{sys.randguid}.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileAccess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;attribute&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Connection&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"AzureStorageConnectionString"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;using&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;blob&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;binder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;BindAsync&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;TextWriter&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;attribute&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;$"Runtime binding: &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&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="nf"&gt;OkResult&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;The binding is declared as an &lt;code&gt;IBinder&lt;/code&gt; type, which gives you the chance to determine the binding configuration. &lt;/p&gt;

&lt;p&gt;In this scenario:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An instance of &lt;code&gt;BlobAttribute&lt;/code&gt; is created by passing the same parameters to the constructor as shown in the default example. 

&lt;ul&gt;
&lt;li&gt;Here you could decide to use custom logic to determine the blob container name or generate a custom blob name.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Connection&lt;/code&gt; property is set.

&lt;ul&gt;
&lt;li&gt;Here you could swap out an app setting name depending on the environment or perhaps input to the function.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;The blob binding is created by calling &lt;code&gt;binder.BindAsync&lt;/code&gt; since the &lt;code&gt;TextWriter&lt;/code&gt; class is used to write to the blob container.&lt;/li&gt;
&lt;li&gt;Calling &lt;code&gt;blob.Write&lt;/code&gt; is what eventually persists the data to the blob container.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Instead of typing the binding as a &lt;code&gt;string&lt;/code&gt; (as shown in the default scenario), the binding is created as a &lt;code&gt;TextWriter&lt;/code&gt;. The &lt;code&gt;TextWriter&lt;/code&gt; class is used because a &lt;code&gt;string&lt;/code&gt; instance has no knowledge of how to write back to the blob container. The &lt;code&gt;TextWriter&lt;/code&gt; is configured to know about the blob container through the call of &lt;code&gt;binder.BindAsync&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Code sample
&lt;/h2&gt;

&lt;p&gt;The sample code is available on GitHub: &lt;a href="https://github.com/craigshoemaker/azure-functions-runtime-binding"&gt;azure-functions-runtime-binding&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;The built-in Azure Functions bindings give you rich access to a number of different cloud services. While the default behavior may work well in many cases, sometime you need the chance to customize a binding's configuration.&lt;/p&gt;

&lt;p&gt;You can customize a binding at runtime via the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Declare the binding parameter as a &lt;a href="https://docs.microsoft.com/azure/azure-functions/functions-dotnet-class-library#binding-at-runtime"&gt;Binder or IBinder&lt;/a&gt; instance.&lt;/li&gt;
&lt;li&gt;Create an instance of the binding attribute.&lt;/li&gt;
&lt;li&gt;Customize the binding attribute as necessary.&lt;/li&gt;
&lt;li&gt;Either use &lt;code&gt;Bind&lt;/code&gt; or &lt;code&gt;BindAsync&lt;/code&gt; to bind the attribute to a cloud service.&lt;/li&gt;
&lt;li&gt;Use the binding&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>serverless</category>
      <category>csharp</category>
      <category>cloud</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
