<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Netlify on Coderrob</title><link>https://coderrob.com/tags/netlify/</link><description>Recent content in Netlify on Coderrob</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 14 Nov 2021 12:27:52 -0600</lastBuildDate><atom:link href="https://coderrob.com/tags/netlify/index.xml" rel="self" type="application/rss+xml"/><item><title>Netlify Functions RESTful API Without Express</title><link>https://coderrob.com/posts/netlify-functions-restful-api-without-express/</link><pubDate>Sun, 14 Nov 2021 12:27:52 -0600</pubDate><guid>https://coderrob.com/posts/netlify-functions-restful-api-without-express/</guid><description>&lt;h2 id="what-are-netlify-functions"&gt;What are Netlify Functions?&lt;/h2&gt;
&lt;p&gt;Netlify Functions provide a simple way to build a serverless API layer for any front-end projects.&lt;/p&gt;
&lt;p&gt;These serverless functions are executed atop AWS&amp;rsquo;s Lambda platform. The rule here is keep it simple&amp;hellip; keep it safe. No, wait, keep it simple, and keep it fast.&lt;/p&gt;
&lt;p&gt;These functions have a default timeout of 10 seconds. Netlify does support background functions that can run around 15 minutes, but focus here is on the short-lived functions.&lt;/p&gt;</description></item><item><title>Netlify Single Page App 404 Redirect</title><link>https://coderrob.com/posts/netlify-single-page-app-404-redirect/</link><pubDate>Mon, 08 Nov 2021 16:36:15 -0600</pubDate><guid>https://coderrob.com/posts/netlify-single-page-app-404-redirect/</guid><description>&lt;h2 id="tldr"&gt;tl;dr&lt;/h2&gt;
&lt;p&gt;Add a &lt;code&gt;netlify.toml&lt;/code&gt; file to the root of your project if one doesn&amp;rsquo;t exist.&lt;/p&gt;
&lt;p&gt;Add the following setting to redirect all routes to your single-page-application.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-toml" data-lang="toml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[[redirects]]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;from = &lt;span style="color:#87ceeb"&gt;&amp;#34;/*&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;to = &lt;span style="color:#87ceeb"&gt;&amp;#34;/index.html&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;status = &lt;span style="color:#f60"&gt;200&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;netlify.toml&lt;/code&gt; file should now look something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://coderrob.com/img/netlify-toml.png" alt="Netlify toml"&gt;&lt;/p&gt;
&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;I started using &lt;a href="https://www.netlify.com/"&gt;Netlify&lt;/a&gt; for a number of side projects and a recent start-up.&lt;/p&gt;
&lt;p&gt;As many do, I started using a single-page-applications (SPA) framework to build up the front-end.&lt;/p&gt;</description></item></channel></rss>