Fix local development. (#87)

This commit is contained in:
kixelated 2023-10-12 13:24:28 +09:00 committed by GitHub
parent 163bc98605
commit c95bb8209f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# dev # Local Development
This is a collection of helpful scripts for local development ONLY. This is a collection of helpful scripts for local development.
## Setup ## Setup
@ -70,6 +70,10 @@ This listens for WebTransport connections on WebTransport `https://localhost:444
./dev/relay ./dev/relay
``` ```
It will print out a URL when you can use to publish. Alternatively, you can use `dev/pub` instead.
> Publish URL: https://quic.video/publish/?server=localhost:4443
### moq-pub ### moq-pub
The following command runs a development instance, broadcasing `dev/source.mp4` to WebTransport `https://localhost:4443`: The following command runs a development instance, broadcasing `dev/source.mp4` to WebTransport `https://localhost:4443`:
@ -78,6 +82,11 @@ The following command runs a development instance, broadcasing `dev/source.mp4`
./dev/pub ./dev/pub
``` ```
It will print out a URL when you can use to watch.
This will contain a random broadcast name so the below link won't work:
> Watch URL: https://quic.video/watch/REPLACE_WITH_NAME?server=localhost:4443
### moq-api ### moq-api
The following commands runs an API server, listening for HTTP requests on `http://localhost:4442` by default. The following commands runs an API server, listening for HTTP requests on `http://localhost:4442` by default.

View File

@ -22,12 +22,12 @@ ARGS=""
# Connect to the given URL to get origins. # Connect to the given URL to get origins.
# TODO default to a public instance? # TODO default to a public instance?
if [ -n "$API" ]; then if [ -n "${API-}" ]; then
ARGS="$ARGS --api $API" ARGS="$ARGS --api $API"
fi fi
# Provide our node URL when registering origins. # Provide our node URL when registering origins.
if [ -n "$NODE" ]; then if [ -n "${NODE-}" ]; then
ARGS="$ARGS --node $NODE" ARGS="$ARGS --node $NODE"
fi fi