Skip to content

Commit

Permalink
Remove python server
Browse files Browse the repository at this point in the history
  • Loading branch information
bryans99 committed Jan 9, 2025
1 parent e7c4c1e commit 4295c70
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 309 deletions.
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,7 @@ To add the embed domain to the `acquire_embed_cookieless_session` payload set th
## Demo
A simple demo is provided in the `/demo` directory that uses a basic JS frontend and a Python backend. The example backend `demo.py` uses the Looker API to create a signed URL. The example backend `demo_self_signed.py` uses the embed secret and a helper function to sign the URL. The instructions below are for the example using the Looker API.
The python simple demo server does not support cookieless embed but alternative TypeScript backend is available which does support cookieless embed.
A simple demo is provided in the `/demo` directory that uses a basic JS frontend and a Node backend. The example backend `server/app.js` uses the Looker API to create a signed URL. The example backend `server/utils/auth_utils.ts` uses the embed secret and a helper function to sign the URL. The instructions below are for the example using the Looker API.
### Step 1 - Enable Embedding in your Looker instance
Expand Down Expand Up @@ -559,14 +557,6 @@ const extensionId = 'extension::my-great-extension'
The following applies to SSO embed only. Run the following commands from the top-level embed-sdk directory.
- `npm install`
- `npm run python`
- The server will print out what host and port it is running on.
If you want to use the `demo_self_signed.py` example you will need to update `packages.json` and replace `demo.py` with `demo_self_signed.py`.
Alternatively run the TypeScript demo server which also supports cookieless embed.
- `npm install`
- `npm run server`
- The server will listen on port 8080.
Expand Down
178 changes: 0 additions & 178 deletions demo/demo.py

This file was deleted.

119 changes: 0 additions & 119 deletions demo/demo_self_signed.py

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"start": "npm run build_utils && webpack serve --config webpack-devserver.config.js --hot --color --progress",
"prepare": "husky",
"prepublishOnly": "npm run test-once",
"python": "webpack --config webpack-devserver.config.js && pip install -r demo/requirements.txt && python demo/demo.py",
"server-prep": "npm run build && webpack --config webpack-devserver.config.js && rm -rf ./server/public && mkdir ./server/public && cp ./demo/*.css ./server/public && cp ./demo/*.html ./server/public && cp ./demo/*.js ./server/public",
"server": "npm run server-prep && cd server && ts-node ./app.ts",
"server-dev": "cd server && find . -type f -name '*.js' -delete && ts-node-dev --watch ./utils ./app.ts",
Expand Down

0 comments on commit 4295c70

Please sign in to comment.