{"id":18646759,"url":"https://github.com/metabase/metabase-nodejs-express-interactive-embedding-sample","last_synced_at":"2025-05-08T21:12:32.086Z","repository":{"id":200812603,"uuid":"699919573","full_name":"metabase/metabase-nodejs-express-interactive-embedding-sample","owner":"metabase","description":"Metabase Interactive Embedding Sample for Node.js","archived":false,"fork":false,"pushed_at":"2025-04-22T20:57:47.000Z","size":1201,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-08T21:12:31.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metabase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-03T15:40:55.000Z","updated_at":"2024-11-29T13:16:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"76b13062-5e10-4622-8dae-6997cb6b8a74","html_url":"https://github.com/metabase/metabase-nodejs-express-interactive-embedding-sample","commit_stats":null,"previous_names":["metabase/metabase-nodejs-express-interactive-embedding-sample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fmetabase-nodejs-express-interactive-embedding-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fmetabase-nodejs-express-interactive-embedding-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fmetabase-nodejs-express-interactive-embedding-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metabase%2Fmetabase-nodejs-express-interactive-embedding-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metabase","download_url":"https://codeload.github.com/metabase/metabase-nodejs-express-interactive-embedding-sample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253149617,"owners_count":21861739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T06:22:28.842Z","updated_at":"2025-05-08T21:12:32.052Z","avatar_url":"https://github.com/metabase.png","language":"JavaScript","funding_links":[],"categories":["Metabase Examples"],"sub_categories":["Official Examples"],"readme":"# Metabase Node.js interactive embedding sample\n\nThis repo includes sample code referenced in the [quick start guide](https://www.metabase.com/learn/customer-facing-analytics/interactive-embedding-quick-start) for setting up interactive embedding with JWT.\n\nYou'll need a Pro or Enterprise version of Metabase up and running. If you're not sure where to start, sign up for [Pro Cloud](https://www.metabase.com/pricing).\n\n## Set up your Metabase\n\n### Create a dashboard\n\nIn the left nav, go to **Browse data** \u003e **Sample Database**. Hover over the `Invoices` table and click on the lightning bolt to X-ray the table.\n\nClick the button to **Save this** as a dashboard. Metabase will save this dashboard in the collection called \"Automatically generated dashboards\".\n\nVisit that dashboard in the \"Automatically generated dashboards\" and make a note of its URL. If it's the first dashboard you created, it's probably `/dashboard/1` followed by a description.\n\n### Enable SSO with JWT\n\nFrom any Metabase page, click on the **gear** icon in the upper right and select **Admin Settings** \u003e **Settings** \u003e **Authentication**.\n\nOn the card that says **JWT**, click the **Setup** button.\n\n### JWT Identity provider URI\n\nIn **JWT IDENTITY PROVIDER URI** field, paste  `localhost:9090/login`.\n\n### String used by the JWT signing key\n\nClick the **Generate key** button. Copy the key.\n\n## Running the server\n\n### Install packages\n\nRun:\n\n```sh\nnpm install\n```\n\n### Set environment variables\n\nYou'll need to set some environment variables for your server.\n\n- [METABASE_SITE_URL](#metabase_site_url)\n- [METABASE_JWT_SHARED_SECRET](#metabase_jwt_shared_secret)\n- [METABASE_DASHBOARD_PATH](#)\n\n### METABASE_SITE_URL\n\n```sh\nexport METABASE_SITE_URL=\"https://myapp.metabaseapp.com\"\n```\n\nReplacing \"https://myapp.metabaseapp.com\" with the root path of your Metabase.\n\n### METABASE_JWT_SHARED_SECRET\n\n```sh\nexport METABASE_JWT_SHARED_SECRET=\"COPY_SECRET_FROM_JWT_CONFIG\"\n```\nYou can get this key from your Metabase by clicking on the **gear** icon and going to **Admin Settings** \u003e **Settings** \u003e **Authentication** \u003e **JWT**.\n\n### METABASE_DASHBOARD_PATH\n\nIf the dashboard you created above doesn't have an ID of 1, you'll also need to update the path:\n\n```sh\nexport METABASE_DASHBOARD_PATH=`/dashboard/id`\n```\n\nReplacing `id` with the ID number of your dashboard.\n\n## Starting the app\n\nStart the server by running:\n\n```sh\nnode index.js\n```\n\nThe app runs by default on port 9090. If you want to run it on a different port, set the `PORT` environment variable:\n```sh\nexport PORT=8081\n```\n\n\nVisit [http://localhost:9090/analytics](localhost:9090/analytics) and sign in with the following credentials:\n\n```sh\nuser: rene@example.com\npassword: foobar\n```\n\n## Set up groups and data sandboxing\n\nCheck out our [quick start guide](https://www.metabase.com/learn/customer-facing-analytics/interactive-embedding-quick-start) to set up interactive embedding with JWT and data sandboxing.\n\n## Reporting issues\n\nPlease report bugs or feature requests as issues in this reporsitory. Please do not report security vulnerabilities on the public GitHub issue tracker. Our Security Policy describes [the procedure](https://github.com/metabase/metabase/security#reporting-a-vulnerability) for disclosing security issues.\n\n## Author\n\n[Metabase](https://metabase.com)\n\n## License\n\nThis project is licensed under the MIT license. See the [LICENSE](./LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Fmetabase-nodejs-express-interactive-embedding-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetabase%2Fmetabase-nodejs-express-interactive-embedding-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetabase%2Fmetabase-nodejs-express-interactive-embedding-sample/lists"}