Skip to content

Example of embedding a Rill dashboard in a Next.js project

License

Notifications You must be signed in to change notification settings

rilldata/rill-embedding-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rill embedding example

Netlify Status

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.

Developing

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.

About

Example of embedding a Rill dashboard in a Next.js project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 89.8%
  • CSS 10.2%