<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="atom.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog</id>
    <title>Go Blog</title>
    <updated>2026-02-14T00:00:00.000Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <link rel="alternate" href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog"/>
    <subtitle>Go Blog</subtitle>
    <icon>https://yellow-pebble-04891261e.4.azurestaticapps.net/img/favicon.ico</icon>
    <entry>
        <title type="html"><![CDATA[Looking Deeply Into Different Learning Styles]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/learning-style</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/learning-style"/>
        <updated>2026-02-14T00:00:00.000Z</updated>
        <summary type="html"><![CDATA["What is the opposite of prince?"]]></summary>
        <content type="html"><![CDATA[<p>"What is the opposite of prince?"
In elementary school, I remember getting a big red X on a language test. I was sure my answer was correct.</p>
<p>The question was a simple antonym:</p>
<p>"What is the opposite of prince?"
Right answer? "Princess"</p>
<p>My answer? "Peasant"</p>
<p>I was shocked and puzzled. I thought, "Isn't a peasant the opposite of a prince? A prince is a noble, while a peasant is a commoner. They are on opposite ends of the social hierarchy."</p>
<p>That moment stuck with me. It showed me that people can interpret the same question in different ways, and that a "correct" answer is not always the only valid one. It also made me reflect on how I learn and how I approach problems.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="learning-styles">Learning styles<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/learning-style#learning-styles" class="hash-link" aria-label="Direct link to Learning styles" title="Direct link to Learning styles" translate="no">​</a></h2>
<p>If you answered "Princess," you might be a Symmetry learner. If you answered "Peasant," you might be a Hierarchy learner.</p>
<table><thead><tr><th>Feature</th><th>"Princess" (Symmetry)</th><th>"Peasant" (Hierarchy)</th></tr></thead><tbody><tr><td>Brain focus</td><td>Horizontal (same level, different side)</td><td>Vertical (same side, different level)</td></tr><tr><td>Primary tool</td><td>Similarity / mirroring</td><td>Contrast / scale</td></tr><tr><td>Strength</td><td>Speed and harmony</td><td>Depth and logic</td></tr><tr><td>Weakness</td><td>Might miss "outside the box" details</td><td>Might make things more complex than needed</td></tr></tbody></table>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-this-applies-to-learning-programming">How this applies to learning programming<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/learning-style#how-this-applies-to-learning-programming" class="hash-link" aria-label="Direct link to How this applies to learning programming" title="Direct link to How this applies to learning programming" translate="no">​</a></h2>
<p>When learning programming, a Symmetry learner might focus on the overall structure and patterns of code, while a Hierarchy learner might focus on details and how components interact.</p>
<p>For example, a Symmetry learner might quickly grasp the concept of functions and reuse, while a Hierarchy learner might take longer to learn the syntax but build a stronger mental model of how functions call each other.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="strengths-and-weaknesses">Strengths and weaknesses<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/learning-style#strengths-and-weaknesses" class="hash-link" aria-label="Direct link to Strengths and weaknesses" title="Direct link to Strengths and weaknesses" translate="no">​</a></h3>
<p>Symmetry learners often excel at quickly understanding new languages and frameworks because they spot patterns. However, they might struggle with debugging and complex codebases because they can miss "outside the box" details.</p>
<p>Hierarchy learners often excel at debugging and understanding complex codebases because they track interactions carefully. However, they might struggle to ramp up quickly on a new language because they can get caught in the details.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="in-other-words">In Other words<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/learning-style#in-other-words" class="hash-link" aria-label="Direct link to In Other words" title="Direct link to In Other words" translate="no">​</a></h2>
<ol>
<li class="">The "Princess" Responder: The Pattern Seeker
This person prioritizes Symmetry and Association.</li>
</ol>
<p>Thinking Style: Intuitive &amp; Relational. They look for the "Matching Pair." In their mind, words exist in sets (Salt/Pepper, Left/Right).</p>
<p>Learning Style: They learn best through Analogies (just like we’ve been doing!). They want to know how a new concept fits into an existing "pair" or "family."</p>
<p>In Coding: This person will write very clean, predictable code. They will name their functions beautifully (like Open/Close) because their brain craves that symmetrical balance.</p>
<ol start="2">
<li class="">The "Peasant" Responder: The Systems Shaker
This person prioritizes Context and Power Dynamics.</li>
</ol>
<p>Thinking Style: Critical &amp; Structural. They don’t just look at the word; they look at the world the word lives in. They see the hierarchy (High vs. Low) rather than just the gender (Male vs. Female).</p>
<p>Learning Style: They learn best through First Principles. They want to break the system down. They aren't satisfied with a simple "pair"; they want to know the "Why" behind the status of the Prince.</p>
<p>In Coding: This person is great at Architecture and Security. They are the ones who ask, "What happens if the system fails?" or "Who has permission to access this data?" They think about the "levels" of the software.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="first-principles-in-go">First Principles in Go<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/learning-style#first-principles-in-go" class="hash-link" aria-label="Direct link to First Principles in Go" title="Direct link to First Principles in Go" translate="no">​</a></h2>
<p>Why is it the "Opposite" of Analogy?
Analogy says: "This is like that." (It's a shortcut).</p>
<p>First Principles says: "I don't care what that is like. What is this, actually?" (It's a deep dive).</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="final-thoughts">Final thoughts<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/learning-style#final-thoughts" class="hash-link" aria-label="Direct link to Final thoughts" title="Direct link to Final thoughts" translate="no">​</a></h2>
<p>I still remember losing a point for answering "Peasant" and wondering for a long time why it was not accepted.</p>
<p>Not anymore.</p>
<p>Which one are you? Do you see yourself more as a "Princess" or a "Peasant" learner?</p>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="Random" term="Random"/>
        <category label="Learning Style" term="Learning Style"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Continue Core Concepts of Go for API Development]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/core-go-go</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/core-go-go"/>
        <updated>2026-02-10T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Extend from the last blog post, here are more rules to live by when writing Go code for API development. Three more rules to go.]]></summary>
        <content type="html"><![CDATA[<p>Extend from the last blog post, here are more rules to live by when writing Go code for API development. Three more rules to go.</p>
<p><code>Rule 4</code>: Dependencies point inward, not sideways
High-level packages depend on lower-level ones, never the other way around.</p>
<ul>
<li class="">api can depend on store</li>
<li class="">store can depend on model</li>
<li class="">model depends on nothing</li>
</ul>
<p><code>Rule 5</code>: Data shapes travel, behavior stays close to the data</p>
<p>Structs can move across layers, but logic should live where it naturally belongs.</p>
<p><code>Rule 6</code>: Make illegal states unrepresentable
Design types so invalid situations can’t exist in the first place.</p>
<p>Examples:</p>
<p>Use type Slug string instead of string</p>
<p>Use nil pointers to represent absence intentionally</p>
<p>Prefer time.Time over strings</p>
<p>Avoid maps where a struct would express meaning</p>
<p>This rule dramatically reduces defensive code and clarifying questions later.</p>
<p>In Go, types are your first line of validation, not runtime checks.</p>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="Go" term="Go"/>
        <category label="API" term="API"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Core Concepts of Go for API Development]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/core-go</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/core-go"/>
        <updated>2026-02-08T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[If code doesn’t need HTTP, it doesn’t belong in an API handler...]]></summary>
        <content type="html"><![CDATA[<p>If code doesn’t need HTTP, it doesn’t belong in an API handler...</p>
<p>Rule 1: Packages define ownership (and thus responsibility) for code. If code doesn’t need HTTP, it doesn’t belong in an API handler.</p>
<p>In otherwords, Handlers should not decide where data comes from.
The application bootstrap (main.go) decides.
Practical example:</p>
<ul>
<li class="">internal/store owns product logic</li>
<li class="">internal/api/store owns HTTP concerns</li>
<li class="">main / router only wires things together</li>
</ul>
<p>Rule 2: Models can have behaviors (methods)</p>
<ul>
<li class="">Methods let data complete itself</li>
<li class="">Major Benefit: This keeps handlers thin and readable (yah!)</li>
</ul>
<p>Rule 3: If a method mutates state, use a pointer receiver.</p>
<div class="language-go codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-go codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">func</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">p </span><span class="token operator" style="color:#393A34">*</span><span class="token plain">Product</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">WithImage</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"> </span><span class="token operator" style="color:#393A34">...</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span></code></pre></div></div>
<p>Product → copy</p>
<p>*Product → original object</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="lets-cover-other-rules-in-the-next-time">Let's cover other rules in the next time!<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/core-go#lets-cover-other-rules-in-the-next-time" class="hash-link" aria-label="Direct link to Let's cover other rules in the next time!" title="Direct link to Let's cover other rules in the next time!" translate="no">​</a></h2>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="Go" term="Go"/>
        <category label="API" term="API"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[SharePoint Hacks]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/sharepointhacks</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/sharepointhacks"/>
        <updated>2026-02-06T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[When things are not turning out the way you want, you need to find a hack to make it work. Here are some of the hacks I found in SharePoint Online that can help you save time and effort. Let's skip the line.]]></summary>
        <content type="html"><![CDATA[<p>When things are not turning out the way you want, you need to find a hack to make it work. Here are some of the hacks I found in SharePoint Online that can help you save time and effort. Let's skip the line.</p>
<p>Did you know that you can make a call directly from SharePoint Online? You can use a buttonm or a link to trigger a call to a phone number that is not limited to just MS Teams.</p>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">https://teams.microsoft.com/l/call/0/0?users=&lt;user1&gt;,4:&lt;phonenumber&gt;</span><br></span></code></pre></div></div>
<h1>Buttom replacement to expand color palette</h1>
<p>The default color palette in SharePoint Online is limited because it follows the selected theme. It can be frustrating when you want to use a specific color that is not available in the palette. However, you can use a hack to expand the color palette by using a button replacement. You can create a button replacement without developing a separate solution in SPF that opens a color picker and allows you to select any color you want.</p>
<p>Method:</p>
<ul>
<li class="">Use text web part. Use highlighter to select the text and choose the color you want. Then, use the hyperlink option to link the text to the page you want. This way, you can have a wider range of colors to choose from and make your SharePoint Online site more visually appealing.</li>
</ul>
<h1>Reusable web parts</h1>
<p>Not all web parts are created equal. Some web parts are more flexible and reusable than others. Here are my top three reusable web parts in SharePoint Online:</p>
<ol>
<li class="">
<p>Adaptive Card Web Part: This web part allows you to create and display adaptive cards, which are a type of card-based UI that can be used to display information and actions in a visually appealing way. You can reuse the same adaptive card across different pages and sites, making it a great option for displaying consistent information.</p>
</li>
<li class="">
<p>PnP Modern Search Web Part: This web part allows you to create custom search experiences in SharePoint Online. You can reuse the same search configuration across different pages and sites, making it a great option for providing a consistent search experience.</p>
</li>
<li class="">
<p>To continue...</p>
</li>
</ol>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="SharePoint" term="SharePoint"/>
        <category label="Hacks" term="Hacks"/>
        <category label="SPFx" term="SPFx"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Power Platform Governance Review]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/powerplatformgov</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/powerplatformgov"/>
        <updated>2026-02-04T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Take a first glance at Microsoft’s Power Platform Governance best practices to see how real-world companies are implementing them.]]></summary>
        <content type="html"><![CDATA[<p>Take a first glance at Microsoft’s Power Platform Governance best practices to see how real-world companies are implementing them.</p>
<p>Their official guidance focus on the following areas of governance:</p>
<ol>
<li class="">Environment Strategy.</li>
<li class="">Risk Management (data control, security, compliance).</li>
<li class="">Life cycle Management of the solutions.</li>
</ol>
<p><a href="https://learn.microsoft.com/en-us/power-platform/guidance/adoption/admin-best-practices" target="_blank" rel="noopener noreferrer" class="">Reference</a></p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-does-real-world-companies-implement-these-governance-best-practices">How does real world companies implement these governance best practices?<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/powerplatformgov#how-does-real-world-companies-implement-these-governance-best-practices" class="hash-link" aria-label="Direct link to How does real world companies implement these governance best practices?" title="Direct link to How does real world companies implement these governance best practices?" translate="no">​</a></h2>
<p>It depnds on how technology-savy the audience of the organization is. Typically, it is divided into two categories:</p>
<ol>
<li class="">High-Tech Audience:</li>
<li class="">Non-Technical Audience:</li>
</ol>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="typically-problems-faced-in-powerplatform-governance-in-all-organizations">Typically Problems Faced in PowerPlatform Governance in all organizations<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/powerplatformgov#typically-problems-faced-in-powerplatform-governance-in-all-organizations" class="hash-link" aria-label="Direct link to Typically Problems Faced in PowerPlatform Governance in all organizations" title="Direct link to Typically Problems Faced in PowerPlatform Governance in all organizations" translate="no">​</a></h2>
<ol>
<li class="">Lack of proper documentation and training for users.</li>
<li class="">Over-flowing number of environments created without proper strategy.</li>
<li class="">Difficulty in managing data security and compliance across multiple environments.</li>
<li class="">Challenges in maintaining and updating solutions across different environments.</li>
<li class="">Default environment misuse for production workloads.</li>
<li class="">Transfer of ownership when employees leave the organization.</li>
</ol>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="next-topic-to-cover">Next Topic to cover<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/powerplatformgov#next-topic-to-cover" class="hash-link" aria-label="Direct link to Next Topic to cover" title="Direct link to Next Topic to cover" translate="no">​</a></h2>
<p>Let's discuss the product design behind multiple environments (incluing the default environment) in PowerPlatform. Is this correctly designed? What are the pros and cons of having a default environment? And any assumptions that took into place when designing this architecture?</p>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="Power Platform" term="Power Platform"/>
        <category label="Governance" term="Governance"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Let Front and Back End to come together!]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/fronttoback</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/fronttoback"/>
        <updated>2026-01-26T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Why settle for one when you can have both? Docusaurus allows developers to seamlessly integrate frontend and backend functionalities, creating a unified experience for users. 'It is designed to make it easy to build, deploy, and maintain documentation websites, but its flexibility extends far beyond that.]]></summary>
        <content type="html"><![CDATA[<p>Why settle for one when you can have both? Docusaurus allows developers to seamlessly integrate frontend and backend functionalities, creating a unified experience for users. 'It is designed to make it easy to build, deploy, and maintain documentation websites, but its flexibility extends far beyond that.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="architecture-overview">Architecture Overview<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/fronttoback#architecture-overview" class="hash-link" aria-label="Direct link to Architecture Overview" title="Direct link to Architecture Overview" translate="no">​</a></h2>
<p>Docusaurus is built on React, which means you can leverage the power of React components to create dynamic and interactive user interfaces. On the backend, Docusaurus can be integrated with various APIs and services to fetch and display data in real-time.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="docusaurus--go-api-architecture-folder-style-view">Docusaurus + Go API Architecture (Folder-Style View)<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/fronttoback#docusaurus--go-api-architecture-folder-style-view" class="hash-link" aria-label="Direct link to Docusaurus + Go API Architecture (Folder-Style View)" title="Direct link to Docusaurus + Go API Architecture (Folder-Style View)" translate="no">​</a></h2>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">User (Browser)</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">│</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">└── Docusaurus (React)</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">└── fetch() → Go API</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">├── main.go # App entry</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">├── routes.go # HTTP routes</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">├── handlers/ # API endpoints</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">└── middleware/</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">└── cors.go # Browser access rules</span><br></span></code></pre></div></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="why-corsgo-shows-up-here-and-not-modgo">Why cors.go shows up here and not mod.go?<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/fronttoback#why-corsgo-shows-up-here-and-not-modgo" class="hash-link" aria-label="Direct link to Why cors.go shows up here and not mod.go?" title="Direct link to Why cors.go shows up here and not mod.go?" translate="no">​</a></h2>
<p>Frontend does not care about go.mod
Browser does not care about go.mod
API clients do not care about go.mod</p>
<p>mod.go is  just an internal build metadata file for Go projects. It helps manage dependencies and versions but has no role in the runtime behavior of the application. Therefore, it doesn't belong in the integration architecture diagram.</p>
<table><thead><tr><th>File</th><th>Concern Type</th><th>Belongs in Integration Diagram?</th></tr></thead><tbody><tr><td><code>cors.go</code></td><td>Runtime behavior</td><td>✅ Yes</td></tr><tr><td><code>go.mod</code></td><td>Build metadata</td><td>❌ No</td></tr><tr><td><code>main.go</code></td><td>App entry point</td><td>✅ Yes</td></tr><tr><td><code>router.go</code></td><td>HTTP routing</td><td>✅ Yes</td></tr><tr><td><code>go.sum</code></td><td>Dependency lock</td><td>❌ No</td></tr></tbody></table>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="Docusaurus" term="Docusaurus"/>
        <category label="CMS" term="CMS"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Configuring Go API with Azure Container Apps]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/gotchadocusauruss</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/gotchadocusauruss"/>
        <updated>2026-01-20T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[When deploying a Go API to Azure Container Apps (ACA) to serve as the backend for your Docusaurus site, there are some important configuration details to keep in mind.]]></summary>
        <content type="html"><![CDATA[<p>When deploying a Go API to Azure Container Apps (ACA) to serve as the backend for your Docusaurus site, there are some important configuration details to keep in mind.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="cors-configuration">CORS Configuration<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/gotchadocusauruss#cors-configuration" class="hash-link" aria-label="Direct link to CORS Configuration" title="Direct link to CORS Configuration" translate="no">​</a></h2>
<p>By default, ACA does not enable CORS (Cross-Origin Resource Sharing), which is essential for your Docusaurus frontend to communicate with the Go API backend hosted on ACA. To enable CORS, you need to modify your Go API code to include the appropriate headers. Here
's a simple example of how to set CORS headers in your Go API:</p>
<div class="language-go codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-go codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token keyword" style="color:#00009f">import</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token string" style="color:#e3116c">"net/http"</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">func</span><span class="token plain"> </span><span class="token function" style="color:#d73a49">setCORSHeaders</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">w http</span><span class="token punctuation" style="color:#393A34">.</span><span class="token plain">ResponseWriter</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    w</span><span class="token punctuation" style="color:#393A34">.</span><span class="token function" style="color:#d73a49">Header</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">.</span><span class="token function" style="color:#d73a49">Set</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">"Access-Control-Allow-Origin"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"*"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> </span><span class="token comment" style="color:#999988;font-style:italic">// Adjust as needed for security</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    w</span><span class="token punctuation" style="color:#393A34">.</span><span class="token function" style="color:#d73a49">Header</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">.</span><span class="token function" style="color:#d73a49">Set</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">"Access-Control-Allow-Methods"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"GET, POST, OPTIONS"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    w</span><span class="token punctuation" style="color:#393A34">.</span><span class="token function" style="color:#d73a49">Header</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">.</span><span class="token function" style="color:#d73a49">Set</span><span class="token punctuation" style="color:#393A34">(</span><span class="token string" style="color:#e3116c">"Access-Control-Allow-Headers"</span><span class="token punctuation" style="color:#393A34">,</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">"Content-Type"</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">}</span><br></span></code></pre></div></div>
<p>Make sure to call <code>setCORSHeaders</code> in your API handlers to ensure that the headers are included in the responses.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="environment-variables">Environment Variables<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/gotchadocusauruss#environment-variables" class="hash-link" aria-label="Direct link to Environment Variables" title="Direct link to Environment Variables" translate="no">​</a></h2>
<p>When configuring your Docusaurus site to interact with the Go API on ACA, you need to set the correct base URL for the API. In development, you might use a local URL, but in production, you should point to the ACA endpoint.
To manage this, you can use environment variables in Docusaurus. For example, you can set <code>DOCUSAURUS_GO_API_BASE_URL</code> in your <code>.env.development.local</code> file for local development and in your production environment settings for the ACA URL.</p>
<div class="language-env codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-env codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain"># .env.development.local</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">DOCUSAURUS_GO_API_BASE_URL=http://localhost:8080</span><br></span></code></pre></div></div>
<div class="language-env codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-env codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain"># Production environment variable</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">DOCUSAURUS_GO_API_BASE_URL=https://your-container-app.azurecontainerapps.io</span><br></span></code></pre></div></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="fetching-data-in-docusaurus">Fetching Data in Docusaurus<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/gotchadocusauruss#fetching-data-in-docusaurus" class="hash-link" aria-label="Direct link to Fetching Data in Docusaurus" title="Direct link to Fetching Data in Docusaurus" translate="no">​</a></h2>
<p>When fetching data from the API in your Docusaurus components, make sure to use the environment variable to construct the API URL. Here’s an example of how to do this:</p>
<div class="language-tsx codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-tsx codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token keyword" style="color:#00009f">const</span><span class="token plain"> apiUrl </span><span class="token operator" style="color:#393A34">=</span><span class="token plain"> process</span><span class="token punctuation" style="color:#393A34">.</span><span class="token property-access">env</span><span class="token punctuation" style="color:#393A34">.</span><span class="token constant" style="color:#36acaa">DOCUSAURUS_GO_API_BASE_URL</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token operator" style="color:#393A34">?</span><span class="token plain"> </span><span class="token template-string template-punctuation string" style="color:#e3116c">`</span><span class="token template-string interpolation interpolation-punctuation punctuation" style="color:#393A34">${</span><span class="token template-string interpolation">process</span><span class="token template-string interpolation punctuation" style="color:#393A34">.</span><span class="token template-string interpolation">env</span><span class="token template-string interpolation punctuation" style="color:#393A34">.</span><span class="token template-string interpolation constant" style="color:#36acaa">DOCUSAURUS_GO_API_BASE_URL</span><span class="token template-string interpolation interpolation-punctuation punctuation" style="color:#393A34">}</span><span class="token template-string string" style="color:#e3116c">/api/your-endpoint</span><span class="token template-string template-punctuation string" style="color:#e3116c">`</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token operator" style="color:#393A34">:</span><span class="token plain"> </span><span class="token string" style="color:#e3116c">'/api/your-endpoint'</span><span class="token punctuation" style="color:#393A34">;</span><span class="token plain"> </span><span class="token comment" style="color:#999988;font-style:italic">// Fallback for development</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token function" style="color:#d73a49">fetch</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">apiUrl</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">then</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">response </span><span class="token arrow operator" style="color:#393A34">=&gt;</span><span class="token plain"> response</span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">json</span><span class="token punctuation" style="color:#393A34">(</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">.</span><span class="token method function property-access" style="color:#d73a49">then</span><span class="token punctuation" style="color:#393A34">(</span><span class="token plain">data </span><span class="token arrow operator" style="color:#393A34">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">        </span><span class="token comment" style="color:#999988;font-style:italic">// Handle the data</span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    </span><span class="token punctuation" style="color:#393A34">}</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">;</span><br></span></code></pre></div></div>
<p>By following these steps, you can successfully configure your Docusaurus site to work with an API hosted on Azure Container Apps, ensuring smooth communication between the frontend and backend.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="formal-documentation-from-docusaurus">Formal documentation from Docusaurus<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/gotchadocusauruss#formal-documentation-from-docusaurus" class="hash-link" aria-label="Direct link to Formal documentation from Docusaurus" title="Direct link to Formal documentation from Docusaurus" translate="no">​</a></h2>
<p><a href="https://docusaurus.io/docs/deployment" target="_blank" rel="noopener noreferrer" class="">https://docusaurus.io/docs/deployment</a></p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-to-handle-your-backend-api-url">How to handle your Backend API URL:<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/gotchadocusauruss#how-to-handle-your-backend-api-url" class="hash-link" aria-label="Direct link to How to handle your Backend API URL:" title="Direct link to How to handle your Backend API URL:" translate="no">​</a></h2>
<p>Since a Docusaurus site is statically rendered, it cannot access server-side environment variables directly at runtime like a standard Node.js app. Instead, you should pass your backend URL using customFields in your docusaurus.config.js:</p>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="Azure" term="Azure"/>
        <category label="Container Apps" term="Container Apps"/>
        <category label="Docusaurus" term="Docusaurus"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Deploying Go API to Azure Container Apps  - The Right Permissions]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/go-deploy-aca-permissions</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/go-deploy-aca-permissions"/>
        <updated>2026-01-18T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Deploying a Go API to Azure Container Apps (ACA) via Docker is great—until the permissions block you.]]></summary>
        <content type="html"><![CDATA[<p>Deploying a Go API to Azure Container Apps (ACA) via Docker is great—until the permissions block you.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="dont-just-default-to-owner-or-contributor-access">Don’t just default to Owner or Contributor access<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/go-deploy-aca-permissions#dont-just-default-to-owner-or-contributor-access" class="hash-link" aria-label="Direct link to Don’t just default to Owner or Contributor access" title="Direct link to Don’t just default to Owner or Contributor access" translate="no">​</a></h2>
<p>The trick to least privilege is splitting access into three specific roles:</p>
<p><strong>AcrPush</strong>: Give this to your CI/CD (GitHub/DevOps) to upload the image.</p>
<p><strong>AcrPull</strong>: Give this to the Container App’s Managed Identity so it can fetch the image.</p>
<p><strong>Container Apps Contributor</strong>: For the deployment command itself.
The takeaway: Enable Managed Identity on your app. It’s the easiest way to solve the "Image Pull" error without using insecure admin passwords.</p>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="Go" term="Go"/>
        <category label="Azure" term="Azure"/>
        <category label="Container Apps" term="Container Apps"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Why Go Makes API Development Feel Like a Breeze]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/go-api-breeze</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/go-api-breeze"/>
        <updated>2026-01-15T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Why Go Makes API Development Feel Like a Breeze?]]></summary>
        <content type="html"><![CDATA[<p>Why Go Makes API Development Feel Like a Breeze?</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="ditching-legacy-lag-why-go-is-my-api-cheat-code">Ditching Legacy Lag: Why Go is My API Cheat Code<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/go-api-breeze#ditching-legacy-lag-why-go-is-my-api-cheat-code" class="hash-link" aria-label="Direct link to Ditching Legacy Lag: Why Go is My API Cheat Code" title="Direct link to Ditching Legacy Lag: Why Go is My API Cheat Code" translate="no">​</a></h2>
<p>We’ve all been there: staring at a legacy API that crashes under the slightest load, making scaling feel like fitting an elephant through a doorway. A few months ago, that was my life—until I switched to Go.</p>
<p>Honestly? It felt like finding a cheat code for backend development.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="why-go-hits-different">Why Go Hits Different<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/go-api-breeze#why-go-hits-different" class="hash-link" aria-label="Direct link to Why Go Hits Different" title="Direct link to Why Go Hits Different" translate="no">​</a></h2>
<p>Go is intentionally simple. While other languages get bogged down in abstractions, Go’s standard library (especially net/http) gives you everything you need for a production-ready REST API right out of the box. No bloated frameworks required.</p>
<p>But the real magic is concurrency. Go’s "goroutines" are so lightweight you can spin up thousands at once. When we migrated a microservice from Node.js to Go.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-bottom-line">The Bottom Line<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/go-api-breeze#the-bottom-line" class="hash-link" aria-label="Direct link to The Bottom Line" title="Direct link to The Bottom Line" translate="no">​</a></h2>
<p>Deployment is a breeze because Go compiles into a single binary. No dependency nightmares, no "works on my machine" excuses—just build and ship.</p>
<p>If you’re tired of fighting your language and want to start solving actual business problems, Go is the move. It’s fast, the learning curve is gentle, and it won't crumble when real-world traffic hits.</p>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="Go" term="Go"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Go and API]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/goingwithgo</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/goingwithgo"/>
        <updated>2026-01-05T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Going with Go: Building APIs That Last]]></summary>
        <content type="html"><![CDATA[<p>Going with Go: Building APIs That Last</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="why-go-for-apis">Why Go for APIs?<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/goingwithgo#why-go-for-apis" class="hash-link" aria-label="Direct link to Why Go for APIs?" title="Direct link to Why Go for APIs?" translate="no">​</a></h2>
<p>I’ve been exploring different programming languages to build a robust, future-proof API—essentially a master API service designed to stand the test of time.</p>
<p>Go quickly stood out as one of the top choices for backend development, especially for building efficient and scalable APIs. I’ve just embarked on the journey of learning Go, and I’m excited to dive deeper into its capabilities.</p>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="Go" term="Go"/>
        <category label="API" term="API"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Get Started with Drupal]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/drupal-get-started</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/drupal-get-started"/>
        <updated>2025-01-11T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Drupal is a powerful, flexible, and open-source content management system (CMS) that is widely used for buildng websites and applications.]]></summary>
        <content type="html"><![CDATA[<p>Drupal is a powerful, flexible, and open-source content management system (CMS) that is widely used for buildng websites and applications.</p>
<p>Here are some reasons why you might choose Drupal:</p>
<ul>
<li class=""><strong>Flexibility</strong>: Drupal offers a high degree of customization, allowing developers to create complex websites with unique features.</li>
<li class=""><strong>Scalability</strong>: It can handle large amounts of content and traffic, making it
suitable for both small websites and large enterprise applications.</li>
<li class=""><strong>Community Support</strong>: Drupal has a large and active community that contributes modules, themes, and provides support.</li>
<li class=""><strong>Security</strong>: Drupal is known for its robust security features and regular updates to address vulnerabilities.</li>
</ul>
<h1>Get Started with Drupal</h1>
<p>Explorer a good alternative choice to Microsoft, vendor neutral CMS solution.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="prerequisite">Prerequisite<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/drupal-get-started#prerequisite" class="hash-link" aria-label="Direct link to Prerequisite" title="Direct link to Prerequisite" translate="no">​</a></h2>
<ul>
<li class="">PHP</li>
<li class="">Composer</li>
<li class="">Web Server: Apache, Nginx, or IIS</li>
<li class="">Database: MySQL, MariaDB, or PostgreSQL</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="recommended-stack-to-use">Recommended Stack to use<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/drupal-get-started#recommended-stack-to-use" class="hash-link" aria-label="Direct link to Recommended Stack to use" title="Direct link to Recommended Stack to use" translate="no">​</a></h2>
<p>You can use the following pre-packaged solutions</p>
<ul>
<li class="">XAMPP or MAMP (Apache, MySQL, PHP)</li>
<li class="">LAMP (Linux)</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="steps-to-get-started-with-drupal">Steps to get started with Drupal<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/drupal-get-started#steps-to-get-started-with-drupal" class="hash-link" aria-label="Direct link to Steps to get started with Drupal" title="Direct link to Steps to get started with Drupal" translate="no">​</a></h2>
<ol>
<li class="">
<p>Download and install Drupal.
From your target project folder, run the following in terminal:
<code>composer</code>
<code>composer create-project drupal/recommended-project drupal</code>
What will it do? It will create a project folder name "recommended-project" and all put the dependencies in the folder.</p>
</li>
<li class="">
<p>Set up a database</p>
</li>
</ol>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">sql</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">CREATE DATABASE drupal_db;</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">CREATE USER 'drupal_user'@'localhost' IDENTIFIED BY 'your_password';</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">GRANT ALL PRIVILEGES ON drupal_db.* TO 'drupal_user'@'localhost';</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">FLUSH PRIVILEGES;</span><br></span></code></pre></div></div>
<ol start="3">
<li class="">Configure and install drupal by opening your web browser and navigate to
<code>http://localhost:my_site_name_dir</code></li>
</ol>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="Drupal" term="Drupal"/>
        <category label="CMS" term="CMS"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Get Started with Express API]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/expressapi</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/expressapi"/>
        <updated>2024-07-31T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[It is one of the fastest ways to create API for consumption, in JS.]]></summary>
        <content type="html"><![CDATA[<h1>Why Express?</h1>
<p>It is one of the fastest ways to create API for consumption, in JS.</p>
<p>that provides a robust set of features for web and mobile applications. It is designed for building web applications and APIs, making it easier to manage server-side logic, routing, and middleware.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="prerequisite">Prerequisite<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/expressapi#prerequisite" class="hash-link" aria-label="Direct link to Prerequisite" title="Direct link to Prerequisite" translate="no">​</a></h2>
<ul>
<li class="">node js</li>
<li class="">npm</li>
<li class="">Language: JavaScript</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="steps">Steps<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/expressapi#steps" class="hash-link" aria-label="Direct link to Steps" title="Direct link to Steps" translate="no">​</a></h2>
<ol>
<li class="">
<p>From your target project folder, run the following in terminal:
<code> npx express-generator --no-view</code></p>
</li>
<li class="">
<p>Install dependencies by running <code>npm install</code></p>
</li>
<li class="">
<p>Create a new file  <strong>items.js</strong> so definition can be described:</p>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">    var express = require('express');</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    var router = express.Router();</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    // Sample data</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    var items = [</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    { id: 1, name: 'Item 1' },</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    { id: 2, name: 'Item 2' }</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    ];</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    // Get all items</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    router.get('/', function(req, res, next) {</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    res.json(items);</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    });</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    // Get a single item by id</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    router.get('/:id', function(req, res, next) {</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    const item = items.find(i =&gt; i.id === parseInt(req.params.id));</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    if (!item) return res.status(404).send('Item not found');</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    res.json(item);</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    });</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    // Create a new item</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    router.post('/', function(req, res, next) {</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    const newItem = {</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">        id: items.length + 1,</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">        name: req.body.name</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    };</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    items.push(newItem);</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    res.status(201).json(newItem);</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    });</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    module.exports = router;</span><br></span></code></pre></div></div>
</li>
<li class="">
<p>Register the <strong>items.js</strong> file   <code>app.js</code></p>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">    var express = require('express');</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    var path = require('path');</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    var cookieParser = require('cookie-parser');</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    var logger = require('morgan');</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    var indexRouter = require('./routes/index');</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    var usersRouter = require('./routes/users');</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    var itemsRouter = require('./routes/items'); // Add this line</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    var app = express();</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    app.use(logger('dev'));</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    app.use(express.json());</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    app.use(express.urlencoded({ extended: false }));</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    app.use(cookieParser());</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    app.use(express.static(path.join(__dirname, 'public')));</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    app.use('/', indexRouter);</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    app.use('/users', usersRouter);</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    app.use('/items', itemsRouter); // Add this line</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">    module.exports = app;</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span></code></pre></div></div>
</li>
<li class="">
<p>Start the server by typing <code>npm start</code> and test in browser by visiting
<code>http://localhost:3000/items</code>.</p>
<p>Confirm by navigating to the site</p>
</li>
</ol>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="API" term="API"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[MKDocs or Docurausurus?]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/mkdocordocusurus</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/mkdocordocusurus"/>
        <updated>2024-07-19T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Mkdocs are great to use for doucmentation purpose.]]></summary>
        <content type="html"><![CDATA[<p>Mkdocs are great to use for doucmentation purpose.</p>
<p>why people are drawn to the Mkdocs? Because it requires only md language to make edits and it can be used off internet, and many more beautiful feature that comes with the Mkdocs.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="quick-overview-where-does-mkdocs-fit-in">Quick Overview where does Mkdocs fit in?<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/mkdocordocusurus#quick-overview-where-does-mkdocs-fit-in" class="hash-link" aria-label="Direct link to Quick Overview where does Mkdocs fit in?" title="Direct link to Quick Overview where does Mkdocs fit in?" translate="no">​</a></h2>
<p>Here's a quick overview of where MkDocs fits in the broader ecosystem of tools used.</p>
<p>CRM (System of Record)
├─ Dynamics 365
├─ Salesforce
└─ HubSpot</p>
<p>CMS / Docs / Knowledge (System of Knowledge)/Static Site Generators
├─ MkDocs
├─ Docusaurus
├─ GitBook
└─ Confluence
├─ Hugo
└─ Gatsby</p>
<h1>Quick Start</h1>
<h1>Deploy mkdocs-material to Azure</h1>
<p>Easiest tool to build documentation site!</p>
<p>Prerequisites:</p>
<ul>
<li class="">Completed mkdocs project ready for deployment</li>
<li class="">An Azure account with an active subscription</li>
<li class="">A Github account</li>
</ul>
<h1>Deployment</h1>
<p>Fastest way:</p>
<ol>
<li class="">
<p>Go to portal.azure.com</p>
</li>
<li class="">
<p>Search "Static Web Apps" at the search bar  </p>
</li>
<li class="">
<p>Create a new Statatic Web Apps with the following critical information:</p>
<ul>
<li class="">Source: GitHub</li>
<li class="">Repository: Select your source code repository from GitHub</li>
<li class="">Branch: pick Main (for now)</li>
<li class="">Build Presets: HTML</li>
<li class="">App Location: "/site/"</li>
<li class="">output Location: "/"</li>
</ul>
</li>
<li class="">
<p>Click "Review + create" button. Then click "Create".</p>
</li>
<li class="">
<p>Wait for the deployment to complete. It may take ~ 10 minutes.</p>
</li>
<li class="">
<p>To view your web site, click "Go to resource", then click "Visit your site".</p>
</li>
</ol>
<p>!!! note</p>
<p>Don't see the site? Check back later as it may not immediately deploy the site on internet.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-to-update-the-mkdocs">How to Update the MKDOCS?<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/mkdocordocusurus#how-to-update-the-mkdocs" class="hash-link" aria-label="Direct link to How to Update the MKDOCS?" title="Direct link to How to Update the MKDOCS?" translate="no">​</a></h2>
<p>Once the github recognize the main branch, then it will automatically run the steps to automaticlaly host to the web.</p>
<p>Simply, run mkdocs build. Then publish that version in git.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="my-verdict">My verdict<a href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/mkdocordocusurus#my-verdict" class="hash-link" aria-label="Direct link to My verdict" title="Direct link to My verdict" translate="no">​</a></h2>
<p>Intially, I love mkdocs for its simplicity and ease of use. A couple months later, I revisit the docusaurus then I felt it fits better for my use case.</p>
<ul>
<li class="">The front end is more flexible and customizable with React.</li>
<li class="">Its folder structure is more intuitive and easier to navigate.</li>
</ul>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
        <category label="MKDocs" term="MKDocs"/>
        <category label="CMS" term="CMS"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Welcome]]></title>
        <id>https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/welcome</id>
        <link href="https://yellow-pebble-04891261e.4.azurestaticapps.net/blog/welcome"/>
        <updated>2024-01-04T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Whether you’re just starting out or have been deep in the code for years, I hope you’ll find something here that sparks your interest.]]></summary>
        <content type="html"><![CDATA[<p>Whether you’re just starting out or have been deep in the code for years, I hope you’ll find something here that sparks your interest.</p>]]></content>
        <author>
            <name>Gretchun Kim</name>
            <uri>https://linkedin.com/in/gretchunkim</uri>
        </author>
    </entry>
</feed>