An example that showcases how to generate and upload JSON files to the Storage in Serverless Functions on Juno.
When testing this demo, each time you add a note through the frontend, a serverless function should be triggered to deduplicate it in the storage as JSON data and update a list of all notes, which is also stored as JSON.
git clone https://github.com/junobuild/examples
cd rust/json- Install dependencies:
npm ci- Start Juno local emulator:
Important
Requires the Juno CLI to be available npm i -g @junobuild/cli
juno emulator start- Create a Satellite for local dev:
- Visit http://localhost:5866 and follow the instructions.
- Update
juno.config.tswith your Satellite ID.
- Create required collections:
notesin Datastore: http://localhost:5866/datastorejsonin Storage: http://localhost:5866/storage
- Start the frontend dev server (in a separate terminal):
npm run dev- Build the serverless functions (in a separate terminal):
juno functions buildThe emulator will automatically upgrade your Satellite and live reload the changes.