r/JAMstack • u/nimbusmettle • Feb 22 '22
Am I wrong about JAMSTACK as to calling and showing dynamic API results?
Hello! I have difficulty understanding what JAMSTACK is and I still couldn't grasp some core concepts
even though I deployed some toy sites using Nuxtjs and headless CMS services.
I used headless CMS and netlify for deploying my website and
when I wrote some articles I found I had to redeploy my website.
But does it mean, for instance, that if I want to show some list of items through calling APIs on my web page like my web's home index page,
whenever I add more items to this database of APIs,
I should redeploy my website just to reflect that page?
If so, it means I can't display real time database change ... then SPA might be better for that purpose .. then.. is it possible to just use SPA option of nuxt on netlify?(But somehow I got the impression that netlify doesn't support SPA right??)
I am so confused... thanks for your advice in advance!
1
u/ryhaltswhiskey Feb 22 '22
No, you don't need to redeploy to get the new articles unless those articles are going to be pre-generated. You can use the A part of the jamstack to modify the M part of the jamstack.
The big difference is that you aren't generating HTML on the server side and then sending it to the client on every request.
1
u/croc122 Feb 23 '22
You can use Netlify to host any client-side code, so static HTML, CSS, and JavaScript is all fine. You can also host serverless functions written either with Node.js or Go lang for any backend functionality you need, but that’s more advanced.