|
1 | 1 |
|
2 | | -Step 1) Sorry I like to have a custom localhost domain! |
| 2 | +## Step 1) A custom localhost domain |
| 3 | +--- |
3 | 4 | in your /etc/hosts add an entry for embed.demo.com |
4 | 5 | 127.0.0.1 embed.demo.com |
| 6 | +<br/> |
| 7 | +<br/> |
5 | 8 |
|
6 | | -Step 2) configure green ssl |
| 9 | +## Step 2) configure green ssl |
| 10 | +--- |
7 | 11 | create an ssl cert pair named cert.pem and cert.key and place them under the /ssl folder |
8 | | -I found this process worked for me on mac, with the latest browser updates. Green SSL is required for events |
9 | | -https://eengstrom.github.io/musings/self-signed-tls-certs-v.-chrome-on-macos-catalina |
| 12 | +I found this process worked for me on mac, with the latest browser updates. |
| 13 | +[Link to Tutorial](https://eengstrom.github.io/musings/self-signed-tls-certs-v.-chrome-on-macos-catalina) |
| 14 | +Green SSL is required for events |
| 15 | +<br/> |
| 16 | +<br/> |
10 | 17 |
|
11 | 18 |
|
12 | | -Step 3) configure looker |
| 19 | +## Step 3) configure looker |
| 20 | +--- |
13 | 21 | ensure https://embed.demo.com:3000 is added to your looker's embed domain whitelist |
14 | 22 | at <<yourlooker>>.cloud.looker.com/admin/embed |
| 23 | +<br/> |
| 24 | +<br/> |
15 | 25 |
|
16 | | -Step 4) fill out config.ini |
| 26 | +## Step 4) fill out config.ini |
| 27 | +--- |
17 | 28 | I left a config.ini.example with values in it to make it as clear as possible (avoiding little issues like trailing slashes) |
18 | 29 | rename it to config.ini and put in your real values |
| 30 | +<br/> |
| 31 | +<br/> |
19 | 32 |
|
20 | | -Step 5) put in the correct host at |
| 33 | +## Step 5) put in the correct host at |
| 34 | +--- |
21 | 35 | frontend/src/components/dashboard.js line 14. this app does not put in the config.ini values onto the frontend |
| 36 | +<br/> |
| 37 | +<br/> |
22 | 38 |
|
23 | | -Step 5) install the dependencies |
| 39 | +## Step 6) install the dependencies |
| 40 | +--- |
24 | 41 | (highly reccomended to use a virtual environment) |
| 42 | +``` |
25 | 43 | pip install -r requirements.txt |
26 | 44 | cd frontend |
27 | 45 | npm install |
| 46 | +``` |
| 47 | +<br/> |
| 48 | +<br/> |
28 | 49 |
|
29 | | -Step 6) Run it! |
| 50 | +## Step 7) Run it! |
| 51 | +--- |
30 | 52 | I didn't link them up into a single command, so you might need to open two shells |
| 53 | +``` |
31 | 54 | python main.py |
32 | 55 | cd frontend |
33 | 56 | npm start |
| 57 | +``` |
34 | 58 |
|
35 | 59 | Now you should be redirected to https://embed.demo.com:3000 where you should see an embeded dashboard |
36 | 60 | with an event that triggered a simple 'Successfully Loaded!' message |
37 | 61 |
|
38 | | -Step 7) Vary the user and URL generation methods as a test |
| 62 | +<br/> |
| 63 | +<br/> |
| 64 | + |
| 65 | +## Step 8) Vary the user and URL generation methods |
| 66 | +--- |
39 | 67 | User: |
40 | 68 | Since in your real application, the URL will need to be sensitive to the logged in user |
41 | 69 | this demonstrates how the frontend's request will change what the user sees via the userToken |
|
0 commit comments