A sample admin NodeJS script that import and export documents with Juno.
Note
Make sure you have Juno's CLI (npm i -g @junobuild/cli) installed on your machine.
git clone https://github.com/junobuild/examples
cd examples/node/admin/import-export-docs
npm ciConfigure the required variables in .env file.
DATA_SRC: the path to the JSON data that will be read or writtenJUNO_DATASTORE_COLLECTION: the datastore's collection in which the data should be read and write
Adapt your Satellite IDs in the juno.config.mjs.
juno run --src export.mjs
juno run --src import.mjs