Skip to main content

Install the SDK and initialize Juno

If you intend to use Juno solely for hosting purposes, you may skip the following steps, which are necessary only for implementing advanced features such as authentication, datastore or storage.

Conversely, if you plan to utilize these rich features, here is how you can connect Juno to your web app.

  1. Install Juno SDK using npm:
npm i @junobuild/core
  1. Initialize your satellite in your web app:
import { initJuno } from "@junobuild/core";

// TODO: Replace the placeholder satellite ID with your actual satellite ID.
await initJuno({
satelliteId: "aaaaa-bbbbb-ccccc-ddddd-cai"
});

It is generally recommended to initialize the library at the top of your application.

  1. Configure your application with your satellite ID:
  • Manually: Simply replace the satelliteId with the unique ID of your satellite, which can be copied from the console on the overview page.

  • Plugin: Although manual configuration is sufficient, we recommend leveraging environment variables that are automatically injected through the use of plugins provided by Juno. If you are using Next.js or Vite check out the related documentation to set up such a versatile environment.

note

The starting templates incorporate the use of plugins. Run npm create juno@latest to start a new project.