<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>API Gateway on Atamel.Dev</title><link>https://atamel.dev/tags/api-gateway/</link><description>Recent content in API Gateway on Atamel.Dev</description><generator>Hugo</generator><language>en</language><managingEditor>atamel@gmail.com (Mete Atamel)</managingEditor><webMaster>atamel@gmail.com (Mete Atamel)</webMaster><lastBuildDate>Thu, 10 Feb 2022 17:28:06 +0200</lastBuildDate><atom:link href="https://atamel.dev/tags/api-gateway/index.xml" rel="self" type="application/rss+xml"/><item><title>Building APIs with Cloud Functions and API Gateway</title><link>https://atamel.dev/posts/2022/02-10_cloud_functions_api_gateway/</link><pubDate>Thu, 10 Feb 2022 00:00:00 +0000</pubDate><author>atamel@gmail.com (Mete Atamel)</author><guid>https://atamel.dev/posts/2022/02-10_cloud_functions_api_gateway/</guid><description>&lt;h2 id="building-apis-with-cloud-run"&gt;Building APIs with Cloud Run&lt;/h2&gt;
&lt;p&gt;If I want to build an API, I usually use Cloud Run. In Cloud Run, you run a
container and in that container, you run a web server that handles a base URL in
this format:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://&amp;lt;service-name&amp;gt;-&amp;lt;hash&amp;gt;-&amp;lt;region&amp;gt;.a.run.app
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can then have the web server handle any path under that base URL such as:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://&amp;lt;service-name&amp;gt;-&amp;lt;hash&amp;gt;-&amp;lt;region&amp;gt;.a.run.app/hello
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;https://&amp;lt;service-name&amp;gt;-&amp;lt;hash&amp;gt;-&amp;lt;region&amp;gt;.a.run.app/bye
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="building-apis-with-cloud-functions"&gt;Building APIs with Cloud Functions&lt;/h2&gt;
&lt;p&gt;In Cloud Functions, you only have access to a function (no web server) and that
function can only handle the base path:&lt;/p&gt;</description></item></channel></rss>