Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

NodeJS - Admin Example - Read And Save Data

A sample admin NodeJS script to manually set a controller to a Juno satellite.

Getting started

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/controller
npm ci

Execution and development

Run following command in your terminal to execute the script.

juno run --src index.mjs --controllerId=<the-principal-id>

Replace <the-principal-id> with the ID of the principal you are looking to set as a controller.

You can also provide a hint - like a name - for the particular profile.

juno run --src index.mjs --controllerId=<the-principal-id> --profile=my_controller_name

Configuration

If you wish to use this script to configure your satellite, following environment options have to be set in .env.

  • JUNO_MISSION_CONTROL_ID: your mission control ID

Adapt your Satellite IDs in the juno.config.mjs.