Answer the question
In order to leave comments, you need to log in
How to implement a bunch of Gatsby + Strapi?
I'm still just learning technology, so explain on your fingers, please)
Situation:
I'm making a corporate website on a bunch of Gatsby + Strapi. Strapi was chosen as Headless CMS for content management. Integrated, but it turns out that the content is updated only at the time of the assembly, which I run manually on the local.
Task:
A corporate website on Gatsby, where the content is changed via Strapi, and the data from the forms is sent to the server with Node and then to
AmoCRM Several questions arose:
1) How to start auto-assembly and deployment after changing the content?
2) How to implement sending data from forms to the server if the statics will be located on a CDN and is a CDN needed in this case?
3) How would you implement this task using these technologies. Interested in where the backend would be stored, and where the front is and how they will interact.
The more details, the better)
And preferably with links to some guides
Answer the question
In order to leave comments, you need to log in
Strapi has webhooks, they send post requests. You need to deploy one endpoint on the server where the static is located to listen to this hook. The endpoint will issue an exec command which will regenerate the front, something like exec('npm run build').
Strapi -> Web hook -> Turn off the automatic trigger of the hook, do it only manually, so that it does not update after changing any little thing -> After the trigger manually -> POST (you-api-where-place-gatsby.com/api/rebuild) -> progress -> success.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question