
Going JAMstack and Serverless
Having started with web development when JavaScript was disabled in most corporate settings and few websites even had a password-protected section (if a company even had a website), I've seen many development fashions come and go. Some of them return multiple times in different forms, and in some ways JAMstack etc is no different. What's old is new again, and having spent many years doing more and more dynamic sites suddenly I'm looking at a stack that aims to make things as static as possible again. Is this sensible? What's good and bad about it? Here's my initial thoughts.
What's it all about and why should I care?
The point of the JAMstack is to pre-render content so that it can be deployed in static form, generally to a Content Delivery Network. This allows the pages to be returned FAST. Not a few seconds, but milliseconds, depending on content. If you're looking for a cheap option for setting up a simple site that will be fast and reliable, this is a great solution. Many low or medium-volume sites would be free to set up. Since the stack is based around using other APIs to provide additional content like forms and authentication, many of which also have free tiers, you can achieve a fair amount before you spend anything, except maybe for registering that domain.
Think about this for a moment. If you have an idea that you want to outline - promoting your business, showing a quick pitch for an idea, a blog, or even a simple e-commerce site, you can have a template up and deployed in the time it takes to make a coffee.
Is it for me?
Are you at all technical? If not, then the answer is probably not, at least not without help. There are starter templates which will create the skeleton of a blog or pitch deck, and with a few customisations done by someone some could be maintained by a relatively non-technical user, but for the the most part if you want to set up a site with no technical knowledge at all then you're probably better off looking at Wix or similar sites that provide richer tools for visually creating your look and styling.
How do I get started?
Netlify and Zeit are 2 of the key providers for that static front-end hosting. When creating a starter from https://www.gatsbyjs.org/starters/?v=2 you can deploy the starter to Netlify, letting it set up Netlify-hosted website and connecting it up to a Github repository which will store versions of your site code ready to be checked out and edited. Time to start tinkering with a live site is minutes.
Take a bit of time to find the starter that best fits your needs. If you want a simple blog, then you might want to consider something like Sanity.io and their templates, which set up a CMS site along with the Netlify and Github elements. This then gives you a nice friendly tool to create and edit blog posts and then trigger the necessary updates to regenerate the deployed content, which is potentially a bit easier for many to get used to than Markdown text.
Custom domains take a little more setup - if you've already got a domain then you can point that to the Netlify subdomain, but you'll have to allow a while for DNS to propagate before the HTTPS certificates can be generated. You can start working on the Netlify subdomain, but you it's best to allow a day or 2 for the custom domains to be fully ready with HTTPS. The certificate generation can be done automatically, and I quite like 123-reg for registering domains as I'm used to their Advanced DNS editor, although I have no affiliation with them.
The next step is generally going to be to get the clone link for the github repository and check out the code locally. The first thing to do will generally be to find where the default names, content and images are, and replace them with more suitable versions for your site. Maybe also look up where it's defining the colours and make those more suitable. Then check that in.
After a couple of minutes or less your updated site will be available and you'll have a blazing fast web presence with your own content which you can built upon to your heart's content.
Why not WordPress, etc?
Speed, Security Cost. That's the 3 word pitch.