You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _docs/latest/embedding/sdk/quickstart-with-sample-app.md
+44-36Lines changed: 44 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,34 +26,59 @@ This guide sets up the embedded analytics SDK with a [sample React app](https://
26
26
-[A Metabase Pro or Enterprise license](/pricing/) (If you don't have a license, check out [this quickstart](./quickstart) that lacks the paid JWT SSO setup.)
27
27
- (Optional): [Docker](https://www.docker.com/)
28
28
29
+
## Clone the sample app repo
30
+
31
+
1. Clone the [sample React app](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable).
2. Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version.
38
+
39
+
```bash
40
+
git checkout {{page.version}}-stable
41
+
```
42
+
43
+
E.g., if you're running Metabase 1.57 make sure the sample app repo is on the `57-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**.
44
+
29
45
## Two ways to set up the sample app with Metabase
30
46
31
47
-[Quick setup with Docker](#quick-setup-with-docker) (includes a sample Metabase)
32
48
-[Walkthrough setup](#walkthrough-setup) (bring your own Metabase, or spin up a new one)
33
49
34
50
## Quick setup with Docker
35
51
36
-
This quick setup will run a Docker container with the sample app and a sample Metabase.
52
+
This setup will run a Docker container with the sample app and a sample Metabase.
53
+
54
+
1. Copy the environment template file:
55
+
56
+
In the cloned directory, run:
57
+
58
+
```bash
59
+
cp .env.docker.example .env.docker
60
+
```
37
61
38
-
1. Copy `.env.docker.example` to `.env.docker`.
39
62
2. In the `.env.docker` file, replace `<your_enterprise_token>` with your premium embedding token.
63
+
40
64
3. In the top-level directory, run:
41
-
```bash
42
-
yarn start
43
-
```
65
+
66
+
```bash
67
+
yarn start
68
+
```
44
69
45
70
This script will:
46
71
47
72
- Pull a Metabase Docker image and run it in a container.
48
-
- Set up JWT SSO in Metabase.
49
-
- Build and run the sample application with an embedded interactive question.
73
+
- Set up [JWT SSO in Metabase](../../people-and-groups/authenticating-with-jwt)
74
+
- Build and run the sample application with an embedded question.
50
75
51
-
The app will start on [http://localhost:4400](http://localhost:4400).
76
+
4.The app will start on [http://localhost:4400](http://localhost:4400).
52
77
53
-
That's it! You should be [up and running](#at-this-point-you-should-be-up-and-running).
78
+
That's it!
54
79
55
80
If you want to log in to the sample Metabase this command set up, visit [http://localhost:4300](http://localhost:4300). You can log in with email and password as Rene Descartes:
56
-
81
+
E
57
82
- email: rene@example.com
58
83
- password: foobarbaz
59
84
@@ -72,10 +97,9 @@ Here's a quick overview of what you'll be doing:
72
97
73
98
### Start up the sample application
74
99
75
-
5.[Get the sample application](#set-up-the-sample-application).
76
-
6.[Set up the application environment](#set-up-the-application-environment).
77
-
7.[Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components.
78
-
8.[Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK.
100
+
5.[Set up the application environment](#set-up-the-application-environment).
101
+
6.. [Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components.
102
+
7.[Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK.
79
103
80
104
And then fiddle around with styling.
81
105
@@ -85,15 +109,15 @@ Let's go.
85
109
86
110
You can run Metabase Pro on a Cloud plan with a [free trial](/pricing/).
87
111
88
-
Or run it locally. Here's a docker one-liner:
112
+
Or run it locally. Here's a [docker](../../installation-and-operation/running-metabase-on-docker) one-liner:
89
113
90
-
```sh
114
+
```bash
91
115
docker run -d -p 3000:3000 --name metabase metabase/metabase-enterprise:latest
92
116
```
93
117
94
118
You can also [download the JAR](https://downloads.metabase.com/enterprise/latest/metabase.jar), and run it like so:
### Check out the branch that corresponds to your Metabase version
158
-
159
-
Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version.
160
-
161
-
E.g., if you're running Metabase 1.53, make sure the sample app repo is on the `53-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**.
162
-
163
-
To switch to another branch, run `git checkout <branch-name>`, e.g.:
164
-
165
-
```
166
-
git checkout 52-stable
167
-
```
168
-
169
175
## Set up the application environment
170
176
177
+
[Clone the sample app](#clone-the-sample-app-repo) and `cd` into it.
178
+
171
179
In the sample app's main directory, copy the `.env.example` template to `.env`.
172
180
173
181
```sh
@@ -233,7 +241,7 @@ Start the client app:
233
241
npm start
234
242
```
235
243
236
-
Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](localhost:3100).
244
+
Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](http://localhost:3100).
Copy file name to clipboardExpand all lines: _docs/v0.57/embedding/sdk/quickstart-with-sample-app.md
+44-36Lines changed: 44 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,34 +24,59 @@ This guide sets up the embedded analytics SDK with a [sample React app](https://
24
24
-[A Metabase Pro or Enterprise license](/pricing/) (If you don't have a license, check out [this quickstart](./quickstart) that lacks the paid JWT SSO setup.)
25
25
- (Optional): [Docker](https://www.docker.com/)
26
26
27
+
## Clone the sample app repo
28
+
29
+
1. Clone the [sample React app](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable).
2. Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version.
36
+
37
+
```bash
38
+
git checkout {{page.version}}-stable
39
+
```
40
+
41
+
E.g., if you're running Metabase 1.57 make sure the sample app repo is on the `57-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**.
42
+
27
43
## Two ways to set up the sample app with Metabase
28
44
29
45
-[Quick setup with Docker](#quick-setup-with-docker) (includes a sample Metabase)
30
46
-[Walkthrough setup](#walkthrough-setup) (bring your own Metabase, or spin up a new one)
31
47
32
48
## Quick setup with Docker
33
49
34
-
This quick setup will run a Docker container with the sample app and a sample Metabase.
50
+
This setup will run a Docker container with the sample app and a sample Metabase.
51
+
52
+
1. Copy the environment template file:
53
+
54
+
In the cloned directory, run:
55
+
56
+
```bash
57
+
cp .env.docker.example .env.docker
58
+
```
35
59
36
-
1. Copy `.env.docker.example` to `.env.docker`.
37
60
2. In the `.env.docker` file, replace `<your_enterprise_token>` with your premium embedding token.
61
+
38
62
3. In the top-level directory, run:
39
-
```bash
40
-
yarn start
41
-
```
63
+
64
+
```bash
65
+
yarn start
66
+
```
42
67
43
68
This script will:
44
69
45
70
- Pull a Metabase Docker image and run it in a container.
46
-
- Set up JWT SSO in Metabase.
47
-
- Build and run the sample application with an embedded interactive question.
71
+
- Set up [JWT SSO in Metabase](../../people-and-groups/authenticating-with-jwt)
72
+
- Build and run the sample application with an embedded question.
48
73
49
-
The app will start on [http://localhost:4400](http://localhost:4400).
74
+
4.The app will start on [http://localhost:4400](http://localhost:4400).
50
75
51
-
That's it! You should be [up and running](#at-this-point-you-should-be-up-and-running).
76
+
That's it!
52
77
53
78
If you want to log in to the sample Metabase this command set up, visit [http://localhost:4300](http://localhost:4300). You can log in with email and password as Rene Descartes:
54
-
79
+
E
55
80
- email: rene@example.com
56
81
- password: foobarbaz
57
82
@@ -70,10 +95,9 @@ Here's a quick overview of what you'll be doing:
70
95
71
96
### Start up the sample application
72
97
73
-
5.[Get the sample application](#set-up-the-sample-application).
74
-
6.[Set up the application environment](#set-up-the-application-environment).
75
-
7.[Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components.
76
-
8.[Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK.
98
+
5.[Set up the application environment](#set-up-the-application-environment).
99
+
6.. [Run the app server](#set-up-the-application-server) to handle authentication with JWT and serve the embedded Metabase components.
100
+
7.[Run the client application](#set-up-the-client-application) that will contain Metabase components built with the SDK.
77
101
78
102
And then fiddle around with styling.
79
103
@@ -83,15 +107,15 @@ Let's go.
83
107
84
108
You can run Metabase Pro on a Cloud plan with a [free trial](/pricing/).
85
109
86
-
Or run it locally. Here's a docker one-liner:
110
+
Or run it locally. Here's a [docker](../../installation-and-operation/running-metabase-on-docker) one-liner:
87
111
88
-
```sh
112
+
```bash
89
113
docker run -d -p 3000:3000 --name metabase metabase/metabase-enterprise:latest
90
114
```
91
115
92
116
You can also [download the JAR](https://downloads.metabase.com/enterprise/latest/metabase.jar), and run it like so:
### Check out the branch that corresponds to your Metabase version
156
-
157
-
Check out the branch in the [metabase-nodejs-react-sdk-embedding-sample](https://github.com/metabase/metabase-nodejs-react-sdk-embedding-sample/tree/{{page.version | remove: "v0."}}-stable) repo that corresponds to your Metabase version.
158
-
159
-
E.g., if you're running Metabase 1.53, make sure the sample app repo is on the `53-stable` branch. You can find your Metabase version in the Metabase UI by clicking on the gears icon in the upper right and selecting **About Metabase**.
160
-
161
-
To switch to another branch, run `git checkout <branch-name>`, e.g.:
162
-
163
-
```
164
-
git checkout 52-stable
165
-
```
166
-
167
173
## Set up the application environment
168
174
175
+
[Clone the sample app](#clone-the-sample-app-repo) and `cd` into it.
176
+
169
177
In the sample app's main directory, copy the `.env.example` template to `.env`.
170
178
171
179
```sh
@@ -231,7 +239,7 @@ Start the client app:
231
239
npm start
232
240
```
233
241
234
-
Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](localhost:3100).
242
+
Your browser should automatically open the app. By default, the app runs on [http://localhost:3100](http://localhost:3100).
0 commit comments