2

I'm working with a team of developers, and we need to be able to stand-up a Mesh instance with all the predefined schemas on anyone's laptop.

I'd like to be able to create schemas if they don't exist, based on a collection of JSON files.

I've started a Gentics Mesh plugin that will look for the schema files, then add them via the MeshRestClient.

Is that a good approach?

I'm following the HelloWorld example here to get started -
https://github.com/gentics/mesh-plugin-examples/blob/master/hello-world-plugin/

Jeremy
  • 2,970
  • 1
  • 26
  • 50
  • 1
    We actually had the idea for a "dev mode" that would enable this kind of feature. Using a plugin for this would also be a good idea. Some plugins already setup schemas and nodes. This can additionally be combined with events. A project create event could for example trigger the setup of a project and so on. Related Issue: https://github.com/gentics/mesh-incubator/issues/101 – Jotschi Oct 12 '19 at 22:51

1 Answers1

1

So I built a "mesh-seeding-plugin", and it worked as expected.

It uses a config file to get the list of json schemas to load up, then when the plugin initializes, it created the schemas if they don't exist.

Jeremy
  • 2,970
  • 1
  • 26
  • 50