From 1001e71b483590ce34d1c7cc382636521e48d046 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Mon, 9 Aug 2021 12:44:48 +0000 Subject: [PATCH] Add serve config & more instructions --- README.md | 9 +++++++-- serve.json | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 serve.json diff --git a/README.md b/README.md index 36a1cba..d8c1f31 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ -To build, you'll need Docker. Run `./build.sh` and it should do the rest. +To build, you'll need Docker. Then: -Then, start a local HTTP server and navigate to `http://localhost:port/ui/`. +```bash +./build.sh # runs build in Docker for libapi.{mjs,wasm,worker.js} +serve . # starts a local server with COOP/COEP +``` + +Then, navigate to http://localhost:5000/ui/ in Chrome. diff --git a/serve.json b/serve.json new file mode 100644 index 0000000..9046720 --- /dev/null +++ b/serve.json @@ -0,0 +1,17 @@ +{ + "headers": [ + { + "source": "**/*", + "headers": [ + { + "key": "Cross-Origin-Embedder-Policy", + "value": "require-corp" + }, + { + "key": "Cross-Origin-Opener-Policy", + "value": "same-origin" + } + ] + } + ] +}