This is a basic Next.js project that embeds a Rill dashboard. It embeds the demo/rill-openrtb-prog-ads/bids dashboard and is deployed using Netlify to rill-embedding-example.netlify.app.
See the Embed Dashboards docs page for more details.
First, create a Rill service token:
rill service create rill-embedding-token
Second, write it to a .env
file (which is gitignored):
cat "RILL_SERVICE_TOKEN=<INSERT TOKEN>" > .env
Third, update the rillOrg
, rillProject
, and rillDashboard
variables in pages/api/iframe.js
to reflect the dashboard you want to embed:
const rillOrg = "demo";
const rillProject = "rill-openrtb-prog-ads";
const rillDashboard = "bids";
Lastly, run the development server:
npm install
npm run dev
Open http://localhost:3000 with your browser to see the result.