System Information
- Strapi Version:
- Operating System:
- Database:
- Node Version:
- NPM Version:
- Yarn Version:
Considering strapi is node based, I am wondering if it is possible to:
- Create content types and components using the cli
- Add data using the cli
How
- I would have the content types definitions on a json file, and run that file on the terminal once, after installing strapi.
- I would also have the content data on several json files, and run then vía the terminal. This would save the data on the database.
Why
-
Anything could go wrong at some point. Content types or even worse, database could end up being damaged or corrupted. Yes, I can restore the database, but I am not certain at what point the database was corrputed/damaged, and If I restore the database at some point because some specific table was corrupted, I would overwrite the entire database.
-
By having separate json files for the content types, and content data, I am free to delete and restore a specific content type and content data independently, without affecting the rest of my application backend.
-
Also I can share with other developers content types and content data “modules”.
-
The key benefit I see with this approach is modularization/independece of content types/data, and the ability to restore them independently in the case something goes wrong.
Is this possible?
I hope I made my point clearly.
Loving Strapi