2

I'm integration nuxtjs/content (https://content.nuxtjs.org/writing) for my contents. But I would like to have the json file generated from responses from my API.

How I can create a command to retrieve, maybe thought cron, the contents and save it in content/ folder?

kissu
  • 40,416
  • 14
  • 65
  • 133
Claudio Ɯǝıs Mulas
  • 1,116
  • 3
  • 15
  • 24

1 Answers1

0

You could indeed, depending of your hosting solution, have something running every midnight and rebuilding your app. Where you could run some Node.js script to create files in the given directories before it is handled by nuxt/content.

An example of code can be found here: https://stackoverflow.com/a/67689890/8816585

kissu
  • 40,416
  • 14
  • 65
  • 133