Before embedding, remember to publish your dashboard by following these steps:
Create a .env
file in the root of your project with the following content:
METABASE_SITE_URL=http://localhost:3000
METABASE_SECRET_KEY=<YOUR_METABASE_SECRET_KEY>
Update page.tsx
with your dashboard payload. You can see it on the embedding page.
Example:
const payload = {
resource: { dashboard: 2 },
params: {},
exp: Math.round(Date.now() / 1000) + (10 \* 60) // 10 minute expiration
};
First, install the dependencies by running:
npm install
Then, run the development server:
npx next dev
Open http://localhost:3000 with your browser to see the result.
This project is licensed under the MIT License.