Jamstack
Originally published
Last modified
Jamstack is more of a concept about using Javascript, APIs, and Markup than a specific set of software.
- Serve static pages that were generated from some markup (like Markdown, or even raw HTML)
- Create microservice APIs to serve dynamic page content
- Use Javascript call the APIs for dynamic page content
Using this approach can significantly reduce the server load to host a website; as less processing is required to get the initial static content.
Jamstack is similar to serverless, in that both approaches serve static UI files, but Jamstack allows a hosted server to be running.
The Jamstack concept was created by the people running Netlify, and Netlify provides some nice conveniences for hosting and configuration.
Redirects
One convenience that Netlify provides is allowing redirects to be specified in a simple text file named _redirects
.
The only equivalent to a _redirects
file for self-hosted Jamstack apps is Apache's .htaccess
files, which can make folder-specific Apache configuration, including redirects.
Nginx and Caddy do not have an equivalent of .htaccess
files or _redirects
files, so I created redirect-config-server, which integrates with Nginx and Caddy to provide self-hosted Netlify _redirects
support.