System Information
- 4.x:
- Docker:
- Postgres:
I’ve got Strapi hosted in a DigitalOcean droplet. My front end (Nuxt.js) is also hosted in DigitalOcean using the App Platform.
I’m trying to get my frontend to rebuild whenever content in Strapi updates. The problem is that DigitalOcean’s App Platform has an API for triggering a rebuild but the request expects a body to be sent and Strapi doesn’t appear to have any way of adding a body to a webhook.
I’ve read around and found that other developers are adding a lifecycles.js
file to the content-type and manually sending a request to DigitalOcean’s API whenever that content-type changes. Although that may work it’s really annoying because I have to write the same thing for each and every model I create and if I want to add a new model in the future I’ll have to somehow add a new lifecycle.js
file for that content-type. There doesn’t appear to be a “global” lifecycles.js
for every model.
Am I missing something here or do I really have to create a new lifecycles.js
file to call DigitalOcean’s API for every model?