swtich to Code component

This commit is contained in:
Joel Wetzell
2025-12-19 12:10:35 -06:00
parent 2278015eb6
commit 8f8b372a6c
@@ -2,10 +2,12 @@
title: HTTP > OSC title: HTTP > OSC
--- ---
import { Code } from '@astrojs/starlight/components';
This config starts an HTTP server listening on port `3000`. Any HTTP request coming into that server will result in a OSC message being sent to `127.0.0.1:8000` with the address set to the path from the incoming HTTP message. This config starts an HTTP server listening on port `3000`. Any HTTP request coming into that server will result in a OSC message being sent to `127.0.0.1:8000` with the address set to the path from the incoming HTTP message.
```
# config.yaml export const example = `
modules: modules:
- id: http - id: http
type: http.server type: http.server
@@ -24,4 +26,6 @@ routes:
address: "{{.URL.Path}}" # template the address from the incoming message address: "{{.URL.Path}}" # template the address from the incoming message
- type: osc.message.encode # turn OSC message into bytes - type: osc.message.encode # turn OSC message into bytes
output: udp output: udp
``` `
<Code code={example} title="config.yaml" lang="yaml"/>