From cdf50cbaab17e9371355cc03492065dc5d6bec54 Mon Sep 17 00:00:00 2001 From: Yuta Nakayama Date: Sat, 18 Jan 2025 07:09:43 +0800 Subject: [PATCH] Update README.md minor edit on SSL installation procedure --- packages/motion/README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/motion/README.md b/packages/motion/README.md index 5874b820..81ff5393 100644 --- a/packages/motion/README.md +++ b/packages/motion/README.md @@ -9,9 +9,13 @@ npm i @strudel/motion --save ``` ## Setup SSL for Local Development -`DeviceMotionEvent` only work over HTTPS, so you'll need to set up SSL for local development. -install SSL plugin for Vite -`pnpm install -D @vitejs/plugin-basic-ssl` +`DeviceMotionEvent` only works with HTTPS, so you'll need to enable SSL for local development. +Try installing an SSL plugin for Vite. + +``` +cd website +pnpm install -D @vitejs/plugin-basic-ssl +``` add the basicSsl plugin to the defineConfig block in `strudel/website/astro.config.mjs` ``` @@ -27,7 +31,7 @@ vite: { }, ``` -generate SSL cert if its necessary +generate an SSL certificate to avoid security warnings. `openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout key.pem -out cert.pem` @@ -63,4 +67,4 @@ $:n("[0 1 3 1 5 4]/4") .decay(rotA.range(0,1)) .attack(rotB.range(0,0.1)) .sound("sawtooth").cpm(tempo) -``` \ No newline at end of file +```