Netlify is an web host that specializes in hosting static files. But Netlify also has various solutions for dynamic hosting, and their “Functions” service turns out to be a very easy way to host a Go web application, often for free. In this post, you will get walk through a demo repo author made that shows how to do this. By Carl M. Johnson.
Netlify’ documentation is pretty good, so it is recommended to consult them for more in-depth information. You can see the final version of all of the code on Github and a live demo on Netlify.
The goal is to have a backend fetch the RSS feed we need and return a JSON Feed from the same origin as our website. Go makes it easy to write a service to turn a URL with XML in it into JSON. A quick Go application that uses the feed2json module to create an HTTP server is just few lines of code long.
However Netlify use an AWS Lambda, rather than a normal HTTP service, so we’ll either need to rewrite our service to use Lambda or find an adapter. To learn how to do it, click and follow link to original article. Well done![Read More]