mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 05:38:34 +00:00
docs: move dev info down
This commit is contained in:
parent
bcef67e5a1
commit
44828e2047
@ -8,33 +8,6 @@ This package adds device motion sensing functionality to strudel Patterns.
|
||||
npm i @strudel/motion --save
|
||||
```
|
||||
|
||||
## Setup SSL for Local Development
|
||||
`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`
|
||||
```
|
||||
vite: {
|
||||
plugins: [basicSsl()],
|
||||
server: {
|
||||
host: '0.0.0.0', // Ensures it binds to all network interfaces
|
||||
// https: {
|
||||
// key: '../../key.pem', //
|
||||
// cert: '../../cert.pem',
|
||||
// },
|
||||
},
|
||||
},
|
||||
```
|
||||
|
||||
generate an SSL certificate to avoid security warnings.
|
||||
|
||||
`openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout key.pem -out cert.pem`
|
||||
|
||||
## Usage
|
||||
|
||||
| Motion | Long Names & Aliases | Description |
|
||||
@ -68,3 +41,32 @@ $:n("[0 1 3 1 5 4]/4")
|
||||
.attack(rotB.range(0,0.1))
|
||||
.sound("sawtooth").cpm(tempo)
|
||||
```
|
||||
|
||||
## Setup SSL for Local Development
|
||||
|
||||
`DeviceMotionEvent` only works with HTTPS, so you'll need to enable SSL for local development.
|
||||
Try installing an SSL plugin for Vite.
|
||||
|
||||
```sh
|
||||
cd website
|
||||
pnpm install -D @vitejs/plugin-basic-ssl
|
||||
```
|
||||
|
||||
add the basicSsl plugin to the defineConfig block in `strudel/website/astro.config.mjs`
|
||||
|
||||
```js
|
||||
vite: {
|
||||
plugins: [basicSsl()],
|
||||
server: {
|
||||
host: '0.0.0.0', // Ensures it binds to all network interfaces
|
||||
// https: {
|
||||
// key: '../../key.pem', //
|
||||
// cert: '../../cert.pem',
|
||||
// },
|
||||
},
|
||||
},
|
||||
```
|
||||
|
||||
generate an SSL certificate to avoid security warnings.
|
||||
|
||||
`openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout key.pem -out cert.pem`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user